From ebb9659e03246ef03290cd08173d17edc7fd30fa Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Wed, 8 Dec 2021 23:05:43 +0100 Subject: [PATCH] Add mode to run kapt with JVM IR, use in tests Currently JVM IR is not supported in kapt, so almost all tests are failing, and thus are muted with IGNORE_BACKEND. #KT-49682 --- .../kotlin/config/JVMConfigurationKeys.java | 5 +++++ .../org/jetbrains/kotlin/codegen/GenerationUtils.kt | 4 ++-- plugins/kapt3/kapt3-compiler/build.gradle.kts | 1 + .../src/org/jetbrains/kotlin/kapt3/Kapt3Extension.kt | 12 +++++++++++- .../kotlin/kapt3/test/AbstractIrKotlinKapt3Test.kt | 4 ---- .../kotlin/kapt3/test/AbstractKotlinKapt3Test.kt | 11 ++++++++++- .../testData/converter/abstractEnum.kt | 4 +++- .../testData/converter/abstractMethods.kt | 2 +- .../testData/converter/aliasedImports.kt | 3 ++- .../testData/converter/annotationWithFqNames.kt | 3 ++- .../kapt3-compiler/testData/converter/annotations.kt | 4 +++- .../testData/converter/annotations2.kt | 4 +++- .../testData/converter/annotations3.kt | 3 ++- .../testData/converter/annotationsWithConstants.kt | 1 + .../testData/converter/annotationsWithTargets.kt | 4 +++- .../testData/converter/anonymousDelegate.kt | 1 + .../kapt3-compiler/testData/converter/comments.kt | 3 ++- .../testData/converter/commentsRemoved.kt | 3 ++- .../testData/converter/cyrillicClassName.kt | 2 +- .../kapt3-compiler/testData/converter/dataClass.kt | 4 +++- .../testData/converter/defaultImpls.kt | 4 +++- .../testData/converter/defaultPackage.kt | 1 + .../converter/defaultPackageCorrectErrorTypes.kt | 1 + .../testData/converter/defaultParameterValueOff.kt | 4 +++- .../testData/converter/defaultParameterValueOn.kt | 3 ++- .../testData/converter/delegateCorrectErrorTypes.kt | 1 + .../kapt3-compiler/testData/converter/deprecated.kt | 4 +++- .../kapt3-compiler/testData/converter/enumImports.kt | 3 ++- .../testData/converter/enumInCompanion.kt | 4 +++- .../kapt3/kapt3-compiler/testData/converter/enums.kt | 4 +++- .../testData/converter/errorLocationMapping.kt | 5 +++-- .../testData/converter/errorSuperclass.kt | 4 +++- .../converter/errorSuperclassCorrectErrorTypes.kt | 3 ++- .../testData/converter/fileFacadeJvmName.kt | 3 ++- .../kapt3-compiler/testData/converter/functions.kt | 2 +- .../testData/converter/genericParameters.kt | 3 ++- .../testData/converter/genericRawSignatures.kt | 4 +++- .../testData/converter/genericSimple.kt | 2 +- .../testData/converter/ignoredMembers.kt | 4 +++- .../testData/converter/implicitReturnTypes.kt | 3 ++- .../testData/converter/importsForErrorTypes.kt | 3 ++- .../testData/converter/importsKt22083.kt | 3 ++- .../testData/converter/incorrectDelegate.kt | 2 ++ .../testData/converter/inheritanceSimple.kt | 4 +++- .../testData/converter/inlineClasses.kt | 4 +++- .../converter/innerClassesWithTypeParameters.kt | 4 +++- .../testData/converter/interfaceImplementation.kt | 4 +++- .../testData/converter/invalidFieldName.kt | 4 +++- .../testData/converter/javaKeywords.kt | 2 +- .../testData/converter/javaKeywordsInPackageNames.kt | 2 +- .../kapt3-compiler/testData/converter/javadoc.kt | 4 +++- .../testData/converter/jvmDefaultAll.kt | 3 ++- .../testData/converter/jvmDefaultAllCompatibility.kt | 3 ++- .../testData/converter/jvmDefaultDisable.kt | 3 ++- .../testData/converter/jvmDefaultEnable.kt | 3 ++- .../testData/converter/jvmOverloads.kt | 4 +++- .../kapt3-compiler/testData/converter/jvmStatic.kt | 4 +++- .../testData/converter/jvmStaticFieldInParent.kt | 4 +++- .../kapt3-compiler/testData/converter/kt14996.kt | 4 +++- .../kapt3-compiler/testData/converter/kt14997.kt | 3 ++- .../kapt3-compiler/testData/converter/kt14998.kt | 2 +- .../kapt3-compiler/testData/converter/kt15145.kt | 2 +- .../kapt3-compiler/testData/converter/kt17567.kt | 4 +++- .../kapt3-compiler/testData/converter/kt18377.kt | 4 +++- .../kapt3-compiler/testData/converter/kt18682.kt | 2 +- .../kapt3-compiler/testData/converter/kt19700.kt | 4 +++- .../kapt3-compiler/testData/converter/kt19750.kt | 4 +++- .../kapt3-compiler/testData/converter/kt24272.kt | 1 + .../kapt3-compiler/testData/converter/kt25071.kt | 3 ++- .../kapt3-compiler/testData/converter/kt27126.kt | 3 ++- .../kapt3-compiler/testData/converter/kt28306.kt | 3 ++- .../kapt3-compiler/testData/converter/kt32596.kt | 7 ++++--- .../kapt3-compiler/testData/converter/kt34569.kt | 4 +++- .../testData/converter/lazyProperty.kt | 1 + .../testData/converter/leadingDollars.kt | 2 +- .../testData/converter/leadingDollars2.kt | 3 ++- .../kapt3-compiler/testData/converter/mapEntry.kt | 2 +- .../testData/converter/maxErrorCount.kt | 3 ++- .../testData/converter/methodParameterNames.kt | 4 +++- .../converter/methodPropertySignatureClash.kt | 4 +++- .../kapt3-compiler/testData/converter/modifiers.kt | 4 +++- .../testData/converter/multifileClass.kt | 3 ++- .../testData/converter/nestedClasses.kt | 4 +++- .../testData/converter/nestedClasses2.kt | 3 ++- .../converter/nestedClassesNonRootPackage.kt | 3 ++- .../testData/converter/nonExistentClass.kt | 1 + .../converter/nonExistentClassTypesConversion.kt | 3 ++- .../converter/nonExistentClassWIthoutCorrection.kt | 1 + .../testData/converter/primitiveTypes.kt | 2 ++ .../kapt3-compiler/testData/converter/properties.kt | 2 ++ .../testData/converter/propertyAnnotations.kt | 2 ++ .../testData/converter/recentlyNullable.kt | 3 ++- .../testData/converter/repeatableAnnotations.kt | 3 ++- .../testData/converter/secondaryConstructor.kt | 3 ++- .../testData/converter/severalPackageParts.kt | 2 +- .../testData/converter/strangeIdentifiers.kt | 4 +++- .../testData/converter/strangeNames.kt | 2 +- .../testData/converter/stripMetadata.kt | 3 ++- .../testData/converter/suspendArgName.kt | 2 ++ .../testData/converter/suspendErrorTypes.kt | 3 ++- .../kapt3-compiler/testData/converter/topLevel.kt | 4 +++- .../testData/converter/unsafePropertyInitializers.kt | 4 +++- .../testData/kotlinRunner/DefaultParameterValues.kt | 3 ++- .../testData/kotlinRunner/ErrorLocationMapping.kt | 4 +++- .../testData/kotlinRunner/NestedClasses.kt | 4 +++- .../testData/kotlinRunner/Overloads.kt | 4 +++- .../kapt3-compiler/testData/kotlinRunner/Simple.kt | 4 +++- 107 files changed, 251 insertions(+), 98 deletions(-) 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 e6a5dd6e627..7e6831de92d 100644 --- a/compiler/config.jvm/src/org/jetbrains/kotlin/config/JVMConfigurationKeys.java +++ b/compiler/config.jvm/src/org/jetbrains/kotlin/config/JVMConfigurationKeys.java @@ -85,6 +85,11 @@ public class JVMConfigurationKeys { public static final CompilerConfigurationKey IR = CompilerConfigurationKey.create("IR"); + // Temporary option to make it possible to test kapt with JVM IR. As soon as all tests start to pass, it can be removed, + // and the backend (old or IR) will be deduced from the compiler arguments provided by the user. + public static final CompilerConfigurationKey USE_KAPT_WITH_JVM_IR = + CompilerConfigurationKey.create("Enable JVM IR for kapt"); + public static final CompilerConfigurationKey USE_PSI_CLASS_FILES_READING = CompilerConfigurationKey.create("use a slower (PSI-based) class files reading implementation"); diff --git a/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/codegen/GenerationUtils.kt b/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/codegen/GenerationUtils.kt index 103bd39d172..80046452f50 100644 --- a/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/codegen/GenerationUtils.kt +++ b/compiler/tests-compiler-utils/tests/org/jetbrains/kotlin/codegen/GenerationUtils.kt @@ -185,9 +185,9 @@ object GenerationUtils { analysisResult: AnalysisResult, configureGenerationState: GenerationState.Builder.() -> Unit = {}, ): GenerationState { - /* Currently Kapt3 only works with the old JVM backend, so disable IR for everything except actual bytecode generation. */ val isIrBackend = - classBuilderFactory.classBuilderMode == ClassBuilderMode.FULL && configuration.getBoolean(JVMConfigurationKeys.IR) + (classBuilderFactory.classBuilderMode == ClassBuilderMode.FULL && configuration.getBoolean(JVMConfigurationKeys.IR)) || + configuration.getBoolean(JVMConfigurationKeys.USE_KAPT_WITH_JVM_IR) val generationState = GenerationState.Builder( project, classBuilderFactory, analysisResult.moduleDescriptor, analysisResult.bindingContext, files, configuration diff --git a/plugins/kapt3/kapt3-compiler/build.gradle.kts b/plugins/kapt3/kapt3-compiler/build.gradle.kts index 911d65d8099..18311e318aa 100644 --- a/plugins/kapt3/kapt3-compiler/build.gradle.kts +++ b/plugins/kapt3/kapt3-compiler/build.gradle.kts @@ -13,6 +13,7 @@ dependencies { api(project(":compiler:frontend")) api(project(":compiler:frontend.java")) api(project(":compiler:plugin-api")) + implementation(project(":compiler:backend.jvm.entrypoint")) compileOnly(toolsJarApi()) compileOnly(project(":kotlin-annotation-processing-cli")) diff --git a/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/Kapt3Extension.kt b/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/Kapt3Extension.kt index 57dee5a7180..2adf66e0c41 100644 --- a/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/Kapt3Extension.kt +++ b/plugins/kapt3/kapt3-compiler/src/org/jetbrains/kotlin/kapt3/Kapt3Extension.kt @@ -24,23 +24,27 @@ import com.sun.tools.javac.tree.TreeMaker import com.sun.tools.javac.util.Context import org.jetbrains.kotlin.analyzer.AnalysisResult import org.jetbrains.kotlin.backend.common.output.OutputFile +import org.jetbrains.kotlin.backend.jvm.JvmIrCodegenFactory import org.jetbrains.kotlin.base.kapt3.AptMode.APT_ONLY import org.jetbrains.kotlin.base.kapt3.AptMode.WITH_COMPILATION import org.jetbrains.kotlin.base.kapt3.DetectMemoryLeaksMode import org.jetbrains.kotlin.base.kapt3.KaptFlag import org.jetbrains.kotlin.base.kapt3.KaptOptions import org.jetbrains.kotlin.base.kapt3.collectJavaSourceFiles +import org.jetbrains.kotlin.cli.common.CLIConfigurationKeys import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.OUTPUT import org.jetbrains.kotlin.cli.common.messages.MessageCollector import org.jetbrains.kotlin.cli.common.messages.OutputMessageUtil import org.jetbrains.kotlin.cli.common.output.writeAll import org.jetbrains.kotlin.cli.jvm.plugins.ServiceLoaderLite import org.jetbrains.kotlin.codegen.ClassBuilderMode +import org.jetbrains.kotlin.codegen.DefaultCodegenFactory import org.jetbrains.kotlin.codegen.KotlinCodegenFacade import org.jetbrains.kotlin.codegen.OriginCollectingClassBuilderFactory import org.jetbrains.kotlin.codegen.state.GenerationState import org.jetbrains.kotlin.config.CommonConfigurationKeys import org.jetbrains.kotlin.config.CompilerConfiguration +import org.jetbrains.kotlin.config.JVMConfigurationKeys import org.jetbrains.kotlin.container.ComponentProvider import org.jetbrains.kotlin.context.ProjectContext import org.jetbrains.kotlin.descriptors.ModuleDescriptor @@ -263,6 +267,7 @@ abstract class AbstractKapt3Extension( type = "java-production" ) + val isIrBackend = compilerConfiguration.getBoolean(JVMConfigurationKeys.USE_KAPT_WITH_JVM_IR) val generationState = GenerationState.Builder( project, builderFactory, @@ -271,7 +276,12 @@ abstract class AbstractKapt3Extension( files, compilerConfiguration ).targetId(targetId) - .isIrBackend(false) + .isIrBackend(isIrBackend) + .codegenFactory( + if (isIrBackend) + JvmIrCodegenFactory(compilerConfiguration, compilerConfiguration.get(CLIConfigurationKeys.PHASE_CONFIG)) + else DefaultCodegenFactory + ) .build() val (classFilesCompilationTime) = measureTimeMillis { diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/AbstractIrKotlinKapt3Test.kt b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/AbstractIrKotlinKapt3Test.kt index 5f14fe21e6a..c9a98161126 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/AbstractIrKotlinKapt3Test.kt +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/AbstractIrKotlinKapt3Test.kt @@ -7,10 +7,6 @@ package org.jetbrains.kotlin.kapt3.test import org.jetbrains.kotlin.test.TargetBackend -/* -Currently Kapt3 only works with the old backend. To enable IR, modify the isIrBackend variable computation in GenerationsUtils.compileFiles() -*/ - abstract class AbstractIrClassFileToSourceStubConverterTest : AbstractClassFileToSourceStubConverterTest() { override val backend = TargetBackend.JVM_IR } diff --git a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/AbstractKotlinKapt3Test.kt b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/AbstractKotlinKapt3Test.kt index 98a7ce893e0..e655c282bf8 100644 --- a/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/AbstractKotlinKapt3Test.kt +++ b/plugins/kapt3/kapt3-compiler/test/org/jetbrains/kotlin/kapt3/test/AbstractKotlinKapt3Test.kt @@ -37,6 +37,8 @@ import org.jetbrains.kotlin.codegen.ClassBuilderMode import org.jetbrains.kotlin.codegen.CodegenTestFiles import org.jetbrains.kotlin.codegen.GenerationUtils import org.jetbrains.kotlin.codegen.OriginCollectingClassBuilderFactory +import org.jetbrains.kotlin.config.CompilerConfiguration +import org.jetbrains.kotlin.config.JVMConfigurationKeys import org.jetbrains.kotlin.extensions.StorageComponentContainerContributor import org.jetbrains.kotlin.kapt.base.test.JavaKaptContextTest import org.jetbrains.kotlin.kapt3.Kapt3ComponentRegistrar.KaptComponentContributor @@ -55,7 +57,6 @@ import org.jetbrains.kotlin.resolve.jvm.extensions.PartialAnalysisHandlerExtensi import org.jetbrains.kotlin.test.ConfigurationKind import org.jetbrains.kotlin.test.KotlinTestUtils import org.jetbrains.kotlin.test.TestJdkKind -import org.jetbrains.kotlin.test.util.KtTestUtil import org.jetbrains.kotlin.test.util.trimTrailingWhitespacesAndAddNewlineAtEOF import org.jetbrains.kotlin.utils.PathUtil import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstance @@ -172,6 +173,14 @@ abstract class AbstractKotlinKapt3Test : KotlinKapt3TestBase() { } } + override fun updateConfiguration(configuration: CompilerConfiguration) { + super.updateConfiguration(configuration) + + if (backend.isIR) { + configuration.put(JVMConfigurationKeys.USE_KAPT_WITH_JVM_IR, true) + } + } + protected fun convert( kaptContext: KaptContextForStubGeneration, javaFiles: List, diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/abstractEnum.kt b/plugins/kapt3/kapt3-compiler/testData/converter/abstractEnum.kt index c004dc3ae7d..bb25568606f 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/abstractEnum.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/abstractEnum.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + enum class E { X { override fun a() {} @@ -34,4 +36,4 @@ enum class E3(val a: String) { enum class E4(val a: String, val b: Int, val c: Long, val d: Boolean) { X("", 4, 2L, true) -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/abstractMethods.kt b/plugins/kapt3/kapt3-compiler/testData/converter/abstractMethods.kt index 33b46cd2540..c1ca5fe80f1 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/abstractMethods.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/abstractMethods.kt @@ -6,4 +6,4 @@ abstract class Base { class Impl : Base() { override fun doJob(job: String, delay: Int) {} override fun doJobGeneric(job: T, delay: Int) {} -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/aliasedImports.kt b/plugins/kapt3/kapt3-compiler/testData/converter/aliasedImports.kt index d0fcdebc70e..d868c4f13ab 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/aliasedImports.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/aliasedImports.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES // NO_VALIDATION @@ -25,4 +26,4 @@ class Test { class Test2 { lateinit var date: MyDate -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/annotationWithFqNames.kt b/plugins/kapt3/kapt3-compiler/testData/converter/annotationWithFqNames.kt index 175740491a6..505620b9b33 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/annotationWithFqNames.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/annotationWithFqNames.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES // NO_VALIDATION @@ -29,4 +30,4 @@ class Foo class Bar @Anno(impls = [Joo::class]) -class Boo \ No newline at end of file +class Boo diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/annotations.kt b/plugins/kapt3/kapt3-compiler/testData/converter/annotations.kt index edc5a1c0a69..c1fc673aa6a 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/annotations.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/annotations.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + annotation class Anno1 enum class Colors { WHITE, BLACK } annotation class Anno2( @@ -32,4 +34,4 @@ class TestAnno2 { enum class Enum1 { BLACK, @Anno1 WHITE -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/annotations2.kt b/plugins/kapt3/kapt3-compiler/testData/converter/annotations2.kt index f2024f84ae5..2c9c5f939b5 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/annotations2.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/annotations2.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + @file:kotlin.jvm.JvmName("AnnotationsTest") package test @@ -29,4 +31,4 @@ val @receiver:Anno("top-level-val-receiver") Int.topLevelVal: String @Anno("enum") enum class Enum @Anno("enum-constructor") constructor(@Anno("x") val x: Int) { @Anno("white") WHITE(1), @Anno("black") BLACK(2) -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/annotations3.kt b/plugins/kapt3/kapt3-compiler/testData/converter/annotations3.kt index 5a4227e6aaa..0d7f164211b 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/annotations3.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/annotations3.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_STDLIB interface Parceler @@ -15,4 +16,4 @@ class B class C object BParceler : Parceler -object CParceler : Parceler \ No newline at end of file +object CParceler : Parceler diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithConstants.kt b/plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithConstants.kt index c51f0edc5cd..ae757e37aec 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithConstants.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithConstants.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR //FILE: lib/R.java package lib; diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithTargets.kt b/plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithTargets.kt index 66633fcaf8d..f8be14f4233 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithTargets.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/annotationsWithTargets.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + @Target(AnnotationTarget.FIELD) annotation class FieldAnno @@ -20,4 +22,4 @@ class Baz { @FieldAnno @Anno @JvmField val a: String = "" -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.kt b/plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.kt index 6186ee0b6c2..84450e258fb 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/anonymousDelegate.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES import kotlin.reflect.KProperty diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/comments.kt b/plugins/kapt3/kapt3-compiler/testData/converter/comments.kt index 1a7ac54de55..fb20102e45e 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/comments.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/comments.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR /** Test. */ class Test { @@ -64,4 +65,4 @@ enum class EnumError { /** * `/* Failure */` */ -interface TestComponent \ No newline at end of file +interface TestComponent diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/commentsRemoved.kt b/plugins/kapt3/kapt3-compiler/testData/converter/commentsRemoved.kt index c9eef52e2a9..b2d232579d4 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/commentsRemoved.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/commentsRemoved.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // !KEEP_KDOC_COMMENTS_IN_STUBS /** Test. */ class Test { @@ -64,4 +65,4 @@ enum class EnumError { /** * `/* Failure */` */ -interface TestComponent \ No newline at end of file +interface TestComponent diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/cyrillicClassName.kt b/plugins/kapt3/kapt3-compiler/testData/converter/cyrillicClassName.kt index 4867cc4edde..e84ba1b4ad0 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/cyrillicClassName.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/cyrillicClassName.kt @@ -1,2 +1,2 @@ class Привет -class République \ No newline at end of file +class République diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/dataClass.kt b/plugins/kapt3/kapt3-compiler/testData/converter/dataClass.kt index 93d6d2097ef..b1b72192c6f 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/dataClass.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/dataClass.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + data class User(val firstName: String, val secondName: String, val age: Int) { fun procedure() {} -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/defaultImpls.kt b/plugins/kapt3/kapt3-compiler/testData/converter/defaultImpls.kt index 9ce992049c6..600cf17d93d 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/defaultImpls.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/defaultImpls.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + interface IntfWithoutDefaultImpls interface IntfWithDefaultImpls { @@ -12,4 +14,4 @@ interface Intf { val color: Int get() = BLACK -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/defaultPackage.kt b/plugins/kapt3/kapt3-compiler/testData/converter/defaultPackage.kt index 6d3ab608bb6..fd24bb2ff2b 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/defaultPackage.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/defaultPackage.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // STRICT //FILE: test/ClassRefAnnotation.java diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/defaultPackageCorrectErrorTypes.kt b/plugins/kapt3/kapt3-compiler/testData/converter/defaultPackageCorrectErrorTypes.kt index cf6f0c15663..1970c9265ed 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/defaultPackageCorrectErrorTypes.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/defaultPackageCorrectErrorTypes.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES // STRICT diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOff.kt b/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOff.kt index 186aa40a319..f74f443fb02 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOff.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOff.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + class Foo( val z: Boolean = true, val b: Byte = 0.toByte(), @@ -26,4 +28,4 @@ class Foo( enum class Em { FOO, BAR -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOn.kt b/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOn.kt index 979bc76b0ef..76978432c14 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOn.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/defaultParameterValueOn.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // DUMP_DEFAULT_PARAMETER_VALUES class Foo( @@ -25,4 +26,4 @@ class Foo( enum class Em { FOO, BAR -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/delegateCorrectErrorTypes.kt b/plugins/kapt3/kapt3-compiler/testData/converter/delegateCorrectErrorTypes.kt index bd6bd55143d..88293b3f81c 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/delegateCorrectErrorTypes.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/delegateCorrectErrorTypes.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES @file:Suppress("UNRESOLVED_REFERENCE") diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/deprecated.kt b/plugins/kapt3/kapt3-compiler/testData/converter/deprecated.kt index 473fe202d42..1dfbc1fce60 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/deprecated.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/deprecated.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + package deprecated @Deprecated("Deprecated annotation") @@ -15,4 +17,4 @@ class Foo { var foo: Int @Deprecated("Deprecated getter") get() = 0 @Deprecated("Deprecated setter") set(value) {} -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/enumImports.kt b/plugins/kapt3/kapt3-compiler/testData/converter/enumImports.kt index 0d8c43a5959..3c6c50bf393 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/enumImports.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/enumImports.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES package kapt @@ -9,4 +10,4 @@ import kotlin.annotation.Repeatable enum class Options { A, B, C -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/enumInCompanion.kt b/plugins/kapt3/kapt3-compiler/testData/converter/enumInCompanion.kt index eb480b1e74f..0ac34788c28 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/enumInCompanion.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/enumInCompanion.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + class Test { private val foo = Example.FOO @@ -42,4 +44,4 @@ class Test5 { } } } -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/enums.kt b/plugins/kapt3/kapt3-compiler/testData/converter/enums.kt index 5fe5fbed9ed..0e226c30e85 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/enums.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/enums.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + enum class Enum1 { BLACK, WHITE } @@ -20,4 +22,4 @@ enum class Nested1 { } } }; -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/errorLocationMapping.kt b/plugins/kapt3/kapt3-compiler/testData/converter/errorLocationMapping.kt index 3e914d7114f..1b989edd627 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/errorLocationMapping.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/errorLocationMapping.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES @file:Suppress("UNRESOLVED_REFERENCE", "ANNOTATION_ARGUMENT_MUST_BE_CONST", "NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION") @@ -27,6 +28,6 @@ class ErrorInDeclarations { annotation class Anno(val a: KClass) -// EXPECTED_ERROR(kotlin:11:1) cannot find symbol -// EXPECTED_ERROR(kotlin:6:1) cannot find symbol // EXPECTED_ERROR(kotlin:12:1) cannot find symbol +// EXPECTED_ERROR(kotlin:7:1) cannot find symbol +// EXPECTED_ERROR(kotlin:13:1) cannot find symbol diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/errorSuperclass.kt b/plugins/kapt3/kapt3-compiler/testData/converter/errorSuperclass.kt index d2774008f43..2fe16c67acb 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/errorSuperclass.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/errorSuperclass.kt @@ -1,7 +1,9 @@ +// IGNORE_BACKEND: JVM_IR + package test internal annotation class Anno @Anno @Suppress("UNRESOLVED_REFERENCE") -internal class ClassWithParent: Foo(), Bar, Baz, CharSequence \ No newline at end of file +internal class ClassWithParent: Foo(), Bar, Baz, CharSequence diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/errorSuperclassCorrectErrorTypes.kt b/plugins/kapt3/kapt3-compiler/testData/converter/errorSuperclassCorrectErrorTypes.kt index 54c9e3da093..7530ebe5adc 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/errorSuperclassCorrectErrorTypes.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/errorSuperclassCorrectErrorTypes.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES // NO_VALIDATION // WITH_STDLIB @@ -52,4 +53,4 @@ class MappedList() : AbstractList(), List { interface Parent -class Child : AbstractList(), Parent, List \ No newline at end of file +class Child : AbstractList(), Parent, List diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/fileFacadeJvmName.kt b/plugins/kapt3/kapt3-compiler/testData/converter/fileFacadeJvmName.kt index 2d1d78d7b11..c86f421db56 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/fileFacadeJvmName.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/fileFacadeJvmName.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_STDLIB @file:JvmName("FacadeName") @@ -5,4 +6,4 @@ package a.b.c fun foo() {} -const val bar = 3 \ No newline at end of file +const val bar = 3 diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/functions.kt b/plugins/kapt3/kapt3-compiler/testData/converter/functions.kt index 9fff54a8d72..2e49332bb30 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/functions.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/functions.kt @@ -3,4 +3,4 @@ class FunctionsTest { fun f2() = fun (a: Int, b: Int) = a > b fun f3() = run {} fun f4() = run { 3 } -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/genericParameters.kt b/plugins/kapt3/kapt3-compiler/testData/converter/genericParameters.kt index f58b9b44dcc..8d0d2c4b697 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/genericParameters.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/genericParameters.kt @@ -1,7 +1,8 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES // WITH_STDLIB class MappedList(val list: List, private val function: (T) -> R) : AbstractList(), List { override fun get(index: Int) = function(list[index]) override val size get() = list.size -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/genericRawSignatures.kt b/plugins/kapt3/kapt3-compiler/testData/converter/genericRawSignatures.kt index 69aded054bb..f7ce3a4089f 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/genericRawSignatures.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/genericRawSignatures.kt @@ -1,4 +1,6 @@ +// IGNORE_BACKEND: JVM_IR + class GenericRawSignatures { fun genericFun(): T? = null fun nonGenericFun(): String? = null -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/genericSimple.kt b/plugins/kapt3/kapt3-compiler/testData/converter/genericSimple.kt index 6591df8dcf3..a77f5d0cb89 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/genericSimple.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/genericSimple.kt @@ -12,4 +12,4 @@ class MyClass : Intf, OtherIntf, BaseClass< interface ABC { fun abc(item: T, items: List, vararg otherItems: T): List fun bcd(vararg a: Char): Int -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/ignoredMembers.kt b/plugins/kapt3/kapt3-compiler/testData/converter/ignoredMembers.kt index 301150261e0..6dcc76ab357 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/ignoredMembers.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/ignoredMembers.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + import kotlinx.kapt.* class Test { @@ -10,4 +12,4 @@ class Test { fun nonIgnoredFun() {} val nonIgnoredProperty: String = "" -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/implicitReturnTypes.kt b/plugins/kapt3/kapt3-compiler/testData/converter/implicitReturnTypes.kt index 2e3ddb08f9b..9e1c3814635 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/implicitReturnTypes.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/implicitReturnTypes.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_STDLIB // FILE: lib/Prop.java @@ -34,4 +35,4 @@ val TESTS_LIST = listOf(object : Prop() { override fun set(key: Cl, value: Int) { key.name = " ".repeat(value) } -}) \ No newline at end of file +}) diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/importsForErrorTypes.kt b/plugins/kapt3/kapt3-compiler/testData/converter/importsForErrorTypes.kt index 47d58de39f5..74abdbf08ca 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/importsForErrorTypes.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/importsForErrorTypes.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES import java.util.concurrent.* @@ -9,4 +10,4 @@ import java.util.Calendar.* fun test(): Any? { return null -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/importsKt22083.kt b/plugins/kapt3/kapt3-compiler/testData/converter/importsKt22083.kt index 9ab94d69099..8d326e87015 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/importsKt22083.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/importsKt22083.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES // FILE: a.kt @@ -52,4 +53,4 @@ interface TestC { fun e(): LibFooBar } -// EXPECTED_ERROR(kotlin:17:5) cannot find symbol \ No newline at end of file +// EXPECTED_ERROR(kotlin:17:5) cannot find symbol diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/incorrectDelegate.kt b/plugins/kapt3/kapt3-compiler/testData/converter/incorrectDelegate.kt index 21948c12a71..362358dcf23 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/incorrectDelegate.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/incorrectDelegate.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + class HomeFragment { @Suppress("TOO_MANY_ARGUMENTS", "DELEGATE_SPECIAL_FUNCTION_MISSING") private val categoryNewsListPresenter by moxyPresenter { diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/inheritanceSimple.kt b/plugins/kapt3/kapt3-compiler/testData/converter/inheritanceSimple.kt index a5f43fd0478..30c4e5c5616 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/inheritanceSimple.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/inheritanceSimple.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + interface Context enum class Result { @@ -10,4 +12,4 @@ abstract class BaseClass(context: Context, num: Int, bool: Boolean) { class Inheritor(context: Context) : BaseClass(context, 5, true) { override fun doJob() = Result.SUCCESS -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/inlineClasses.kt b/plugins/kapt3/kapt3-compiler/testData/converter/inlineClasses.kt index e1e2343d068..841b52326b4 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/inlineClasses.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/inlineClasses.kt @@ -1 +1,3 @@ -inline class Cl(val a: String) \ No newline at end of file +// IGNORE_BACKEND: JVM_IR + +inline class Cl(val a: String) diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/innerClassesWithTypeParameters.kt b/plugins/kapt3/kapt3-compiler/testData/converter/innerClassesWithTypeParameters.kt index 02aeabef710..96e01dbe455 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/innerClassesWithTypeParameters.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/innerClassesWithTypeParameters.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + class Test { private var a = FilterValueDelegate() private inner class FilterValueDelegate @@ -13,4 +15,4 @@ class Test2 { class Test3 { private var a = FilterValueDelegate() private class FilterValueDelegate -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/interfaceImplementation.kt b/plugins/kapt3/kapt3-compiler/testData/converter/interfaceImplementation.kt index 0023c203a4c..4906209d385 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/interfaceImplementation.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/interfaceImplementation.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + interface Named { val name: String? } @@ -8,4 +10,4 @@ class Product2 : Named { constructor(otherName: String) { this.name = otherName } -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/invalidFieldName.kt b/plugins/kapt3/kapt3-compiler/testData/converter/invalidFieldName.kt index 00144698f89..6d2b9364697 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/invalidFieldName.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/invalidFieldName.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + enum class Color { BLACK, `WHI-TE` } @@ -5,5 +7,5 @@ enum class Color { @Anno(Color.`WHI-TE`) annotation class Anno(val color: Color) -// EXPECTED_ERROR(kotlin:5:1) an enum annotation value must be an enum constant +// EXPECTED_ERROR(kotlin:7:1) an enum annotation value must be an enum constant // EXPECTED_ERROR(other:-1:-1) 'WHI-TE' is an invalid Java enum value name diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/javaKeywords.kt b/plugins/kapt3/kapt3-compiler/testData/converter/javaKeywords.kt index d380d3ded25..cdb75f7c60c 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/javaKeywords.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/javaKeywords.kt @@ -1,4 +1,4 @@ class default { lateinit val extends: String fun implements(instanceof: Int) {} -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/javaKeywordsInPackageNames.kt b/plugins/kapt3/kapt3-compiler/testData/converter/javaKeywordsInPackageNames.kt index a8eb978bbc3..b00e9295a75 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/javaKeywordsInPackageNames.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/javaKeywordsInPackageNames.kt @@ -16,4 +16,4 @@ class D // FILE: e.kt package a.b.`typealias`.c -class E \ No newline at end of file +class E diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/javadoc.kt b/plugins/kapt3/kapt3-compiler/testData/converter/javadoc.kt index 74adb9117dc..c5bf0c52eb9 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/javadoc.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/javadoc.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + package javadoc /** Simple */ @@ -32,4 +34,4 @@ class B { stars */ val d = "" -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultAll.kt b/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultAll.kt index fe1aec1587a..6bbbabe8791 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultAll.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultAll.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // !JVM_DEFAULT_MODE: all interface Foo { @@ -10,4 +11,4 @@ interface Foo { } fun bar() -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultAllCompatibility.kt b/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultAllCompatibility.kt index 017c41192f9..ab82e4439a4 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultAllCompatibility.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultAllCompatibility.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // !JVM_DEFAULT_MODE: all-compatibility interface Foo { @@ -10,4 +11,4 @@ interface Foo { } fun bar() -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultDisable.kt b/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultDisable.kt index fc3a1e8b581..83f11358bc3 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultDisable.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultDisable.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // !JVM_DEFAULT_MODE: disable interface Foo { @@ -11,4 +12,4 @@ interface Foo { } fun bar() -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultEnable.kt b/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultEnable.kt index 5dc8df3d856..b0e4efbdb01 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultEnable.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/jvmDefaultEnable.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // !JVM_DEFAULT_MODE: enable interface Foo { @@ -11,4 +12,4 @@ interface Foo { } fun bar() -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/jvmOverloads.kt b/plugins/kapt3/kapt3-compiler/testData/converter/jvmOverloads.kt index ed4032c120d..ca73815e5b9 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/jvmOverloads.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/jvmOverloads.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + class State @JvmOverloads constructor( val someInt: Int, val someLong: Long, @@ -14,4 +16,4 @@ class State2 @JvmOverloads constructor( fun someMethod(str: String) {} fun methodWithoutArgs() {} -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/jvmStatic.kt b/plugins/kapt3/kapt3-compiler/testData/converter/jvmStatic.kt index f919195def0..bb4a4191a67 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/jvmStatic.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/jvmStatic.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + class JvmStaticTest { companion object { @JvmStatic @@ -17,4 +19,4 @@ interface FooComponent { @JvmStatic fun create(context: String): String = "foo" } -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/jvmStaticFieldInParent.kt b/plugins/kapt3/kapt3-compiler/testData/converter/jvmStaticFieldInParent.kt index 8a4835138c9..8809cf62b21 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/jvmStaticFieldInParent.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/jvmStaticFieldInParent.kt @@ -1,6 +1,8 @@ +// IGNORE_BACKEND: JVM_IR + class Test { companion object A { @JvmStatic val test: String = "" } -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt14996.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt14996.kt index 463ac4c9152..cfc5b8707a9 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt14996.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt14996.kt @@ -1,7 +1,9 @@ +// IGNORE_BACKEND: JVM_IR + fun crashMe(values: List): String { throw UnsupportedOperationException() } fun crashMe(values: List): CharSequence { throw UnsupportedOperationException() -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt14997.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt14997.kt index e44f1c905e4..04d3c2d9b25 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt14997.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt14997.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_STDLIB @file:Suppress("AMBIGUOUS_ANONYMOUS_TYPE_INFERRED") @@ -32,4 +33,4 @@ fun e() = arrayOf(object : Runnable { fun e1(a: Array) {} fun e2(a: Array) {} fun e3(a: Array) {} -fun e3(a: Array<*>) {} \ No newline at end of file +fun e3(a: Array<*>) {} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt14998.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt14998.kt index 3d3cfa22858..8b040308685 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt14998.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt14998.kt @@ -7,4 +7,4 @@ class Outer { } abstract fun abstract(s: String, i: Int) -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt15145.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt15145.kt index 656636c750e..38e1d4ce0b9 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt15145.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt15145.kt @@ -1,4 +1,4 @@ interface MyInterface { fun someFun() private class MyDefaultInferface() -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt17567.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt17567.kt index ba1aba0ee25..d0ab32dcc23 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt17567.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt17567.kt @@ -1,6 +1,8 @@ +// IGNORE_BACKEND: JVM_IR + package test internal class MutableEntry( private val internal: MutableMap, override val key: K, value: V -): MutableMap.MutableEntry \ No newline at end of file +): MutableMap.MutableEntry diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt18377.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt18377.kt index 9bb238632c3..86b02cbc65a 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt18377.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt18377.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + import java.util.Date -fun Date(double: Double): Date = Date(double.times(1000).toLong()) \ No newline at end of file +fun Date(double: Double): Date = Date(double.times(1000).toLong()) diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt18682.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt18682.kt index db6b81e0b47..c84afc241b3 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt18682.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt18682.kt @@ -22,4 +22,4 @@ fun test4() = (0..10).map { n -> object : Foo(), Runnable { override fun run() {} } -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt19700.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt19700.kt index 2656d6bb4f4..b8321126da8 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt19700.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt19700.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + package test class Test { @@ -8,4 +10,4 @@ class Test { interface ListUpdateCallback { fun onInserted(position: Int, count: Int) -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt19750.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt19750.kt index 6e98b934c2f..8c58cdf8274 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt19750.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt19750.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + package test class Test { @@ -8,4 +10,4 @@ class Test { interface TypedListUpdateCallback { fun onInserted(position: C, count: C, item: T) -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt24272.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt24272.kt index 0e3c4995bab..875eddc4d07 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt24272.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt24272.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // STRICT class Foo(private val string: String) { diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt25071.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt25071.kt index 56e363a538c..6957d4d3534 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt25071.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt25071.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES // FILE: kapt/StaticMethod.java @@ -40,4 +41,4 @@ class StaticImport { val l = of("hello", "world") val m = of2("hello") val y = "1".func() -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt27126.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt27126.kt index ed076c72d9a..e4e14c55f2d 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt27126.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt27126.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_STDLIB @file:Suppress("NOTHING_TO_INLINE") @@ -37,4 +38,4 @@ abstract class BundleProperty(key: String?) : NullableBundleProperty(key } abstract fun setValue(bundle: Any, key: String, value: AA) -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt28306.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt28306.kt index 1a487bcdf36..dc8c4dd109e 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt28306.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt28306.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES package foo @@ -6,4 +7,4 @@ interface InterfaceWithDefaults { fun foo() {} } -interface SubInterface : InterfaceWithDefaults \ No newline at end of file +interface SubInterface : InterfaceWithDefaults diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt32596.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt32596.kt index d92eca86e92..e7be0573b74 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt32596.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt32596.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES @file:Suppress("UNRESOLVED_REFERENCE", "ANNOTATION_ARGUMENT_MUST_BE_CONST") @@ -14,6 +15,6 @@ class ErrorSomeMissingAnnotations annotation class Anno(val klass: KClass<*>) -// EXPECTED_ERROR(kotlin:12:1) cannot find symbol -// EXPECTED_ERROR(kotlin:6:1) cannot find symbol -// EXPECTED_ERROR(kotlin:9:1) cannot find symbol \ No newline at end of file +// EXPECTED_ERROR(kotlin:10:1) cannot find symbol +// EXPECTED_ERROR(kotlin:13:1) cannot find symbol +// EXPECTED_ERROR(kotlin:7:1) cannot find symbol diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/kt34569.kt b/plugins/kapt3/kapt3-compiler/testData/converter/kt34569.kt index 25b9209e5ce..5cc46fefec0 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/kt34569.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/kt34569.kt @@ -1,4 +1,6 @@ +// IGNORE_BACKEND: JVM_IR + class T : Runnable { @Override public override fun run() {} -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/lazyProperty.kt b/plugins/kapt3/kapt3-compiler/testData/converter/lazyProperty.kt index e757e33eed0..4475dc36d9d 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/lazyProperty.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/lazyProperty.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_STDLIB interface Intf diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars.kt b/plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars.kt index 46b3e8278c0..755636d6434 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars.kt @@ -16,4 +16,4 @@ package test fun test(a: `$Test`.`$Inner`) {} -fun test(a: `Test$`.`Inner$`) {} \ No newline at end of file +fun test(a: `Test$`.`Inner$`) {} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars2.kt b/plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars2.kt index 3d8ac610100..81c70d629e2 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars2.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/leadingDollars2.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES // FILE: te/st/a/JavaClass @@ -13,4 +14,4 @@ import te.st.a.`$Test`.Inner as MyInner import te.st.a.`Test$`.Inner as MyInner2 import te.st.a.`Test$`.`Inner$` as MyInner3 -fun a(a: MyInner) {} \ No newline at end of file +fun a(a: MyInner) {} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/mapEntry.kt b/plugins/kapt3/kapt3-compiler/testData/converter/mapEntry.kt index 402ff7dc58f..340f40191cd 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/mapEntry.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/mapEntry.kt @@ -1,4 +1,4 @@ interface EntryHolder { fun entry(p: Map.Entry>): Map.Entry val entryProperty: Map.Entry -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/maxErrorCount.kt b/plugins/kapt3/kapt3-compiler/testData/converter/maxErrorCount.kt index 1fae0c14e08..9a29ef1ac92 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/maxErrorCount.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/maxErrorCount.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES // JAVAC_OPTION -Xmaxerrs=1 @@ -11,4 +12,4 @@ class Test { // There are two errors (unresolved identifier ABC, BCD) actually. // But we specified the max error count, so the error output is limited. -// EXPECTED_ERROR(kotlin:8:5) cannot find symbol \ No newline at end of file +// EXPECTED_ERROR(kotlin:8:5) cannot find symbol diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/methodParameterNames.kt b/plugins/kapt3/kapt3-compiler/testData/converter/methodParameterNames.kt index 5cde588ceb3..b2bd227ea4c 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/methodParameterNames.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/methodParameterNames.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + interface Intf { fun foo(abc: String) @@ -12,4 +14,4 @@ abstract class Cls { fun bar(bcd: Int): String { return "" } -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/methodPropertySignatureClash.kt b/plugins/kapt3/kapt3-compiler/testData/converter/methodPropertySignatureClash.kt index 97155ed4b0b..5052dd83304 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/methodPropertySignatureClash.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/methodPropertySignatureClash.kt @@ -1,7 +1,9 @@ +// IGNORE_BACKEND: JVM_IR + class CrashMe { val resources = 1 fun getResources(): String { return "" } -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/modifiers.kt b/plugins/kapt3/kapt3-compiler/testData/converter/modifiers.kt index f56c9a979c5..c886e8c099d 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/modifiers.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/modifiers.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + package modifiers public class PublicClass public constructor() @@ -34,4 +36,4 @@ class Modifiers { @JvmOverloads fun overloads(a: String = "", n: Int = 5): String = null!! -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/multifileClass.kt b/plugins/kapt3/kapt3-compiler/testData/converter/multifileClass.kt index d8a9db75102..bc8b7e9620f 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/multifileClass.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/multifileClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // WITH_STDLIB // FILE: a.kt @@ -19,4 +20,4 @@ fun bar() {} @file:JvmName("M2") package test -fun baz() {} \ No newline at end of file +fun baz() {} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses.kt b/plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses.kt index ea2c7cb2bc7..72edaf489c3 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + class Test { class Nested { class NestedNested @@ -55,4 +57,4 @@ class A2 { } } } -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses2.kt b/plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses2.kt index d46331ff225..c62bbce254b 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses2.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/nestedClasses2.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // FILE: JavaClass.java public class JavaClass { public class Foo { @@ -78,4 +79,4 @@ class Test1(val zoo: Foo.Bar.Zoo) : Foo.Bar(), IFoo.IBar, IFoo.IBar.IZoo { } // EXPECTED_ERROR class J$B is public, should be declared in a file named J$B.java -// EXPECTED_ERROR class JavaClass is public, should be declared in a file named JavaClass.java \ No newline at end of file +// EXPECTED_ERROR class JavaClass is public, should be declared in a file named JavaClass.java diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/nestedClassesNonRootPackage.kt b/plugins/kapt3/kapt3-compiler/testData/converter/nestedClassesNonRootPackage.kt index 9029cac2375..b10777f1f09 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/nestedClassesNonRootPackage.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/nestedClassesNonRootPackage.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // FILE: test/JavaClass.java package test; @@ -83,4 +84,4 @@ class Test1(val zoo: Foo.Bar.Zoo) : Foo.Bar(), IFoo.IBar, IFoo.IBar.IZoo { fun b(foo: JavaClass.Foo, bar: JavaClass.Foo.Bar) {} } -// EXPECTED_ERROR class J$B is public, should be declared in a file named J$B.java \ No newline at end of file +// EXPECTED_ERROR class J$B is public, should be declared in a file named J$B.java diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClass.kt b/plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClass.kt index 983786e8d66..00b1e198996 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClass.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClass.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES // NON_EXISTENT_CLASS // NO_VALIDATION diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassTypesConversion.kt b/plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassTypesConversion.kt index 24725863313..27f0d0cc840 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassTypesConversion.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassTypesConversion.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES // NON_EXISTENT_CLASS // NO_VALIDATION @@ -63,4 +64,4 @@ class Test { class MyType -annotation class Anno(val a: KClass<*>, val b: Array>, val c: Array>, vararg val d: KClass<*>) \ No newline at end of file +annotation class Anno(val a: KClass<*>, val b: Array>, val c: Array>, vararg val d: KClass<*>) diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassWIthoutCorrection.kt b/plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassWIthoutCorrection.kt index 74673d53507..f18024ba095 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassWIthoutCorrection.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/nonExistentClassWIthoutCorrection.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // NON_EXISTENT_CLASS // NO_VALIDATION diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/primitiveTypes.kt b/plugins/kapt3/kapt3-compiler/testData/converter/primitiveTypes.kt index f6db55e43b5..0840bdde4ee 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/primitiveTypes.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/primitiveTypes.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + object PrimitiveTypes { const val booleanFalse: Boolean = false const val booleanTrue: Boolean = true diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/properties.kt b/plugins/kapt3/kapt3-compiler/testData/converter/properties.kt index e5b5336a681..15a2ff66f17 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/properties.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/properties.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + class Test { val simple: String = "123" diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/propertyAnnotations.kt b/plugins/kapt3/kapt3-compiler/testData/converter/propertyAnnotations.kt index 6587e068041..9f7c5216086 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/propertyAnnotations.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/propertyAnnotations.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + annotation class Anno @Target(AnnotationTarget.PROPERTY, AnnotationTarget.CLASS) diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/recentlyNullable.kt b/plugins/kapt3/kapt3-compiler/testData/converter/recentlyNullable.kt index 6c5a5673733..f535d7fc55f 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/recentlyNullable.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/recentlyNullable.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // FILE: androidx/annotation/RecentlyNullable.java package androidx.annotation; @@ -20,4 +21,4 @@ package app import androidx.annotation.Box -class KBox(val delegate: Box) : Box by delegate \ No newline at end of file +class KBox(val delegate: Box) : Box by delegate diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/repeatableAnnotations.kt b/plugins/kapt3/kapt3-compiler/testData/converter/repeatableAnnotations.kt index 5076b22356d..00cb90da691 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/repeatableAnnotations.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/repeatableAnnotations.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // FILE: lib/Anno.java package lib; public @interface Anno { @@ -55,4 +56,4 @@ annotation class AnnoEnum(val x: Int, val c: Color) @AnnoLongArray(lib.R.id.textView, [1L, 3L]) @AnnoArray(lib.R.id.textView, [ "A", "B" ]) @AnnoClass(lib.R.id.textView, Color::class) -class Test2 \ No newline at end of file +class Test2 diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/secondaryConstructor.kt b/plugins/kapt3/kapt3-compiler/testData/converter/secondaryConstructor.kt index b8f766b0947..e7b75a06e2d 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/secondaryConstructor.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/secondaryConstructor.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES package secondary @@ -12,4 +13,4 @@ class Product2 : Named { constructor(otherName: String) { this.name = otherName } -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/severalPackageParts.kt b/plugins/kapt3/kapt3-compiler/testData/converter/severalPackageParts.kt index 0822dcc4dcb..31291d3ae53 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/severalPackageParts.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/severalPackageParts.kt @@ -6,4 +6,4 @@ fun foo() {} // FILE: b.kt package test -fun bar() {} \ No newline at end of file +fun bar() {} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/strangeIdentifiers.kt b/plugins/kapt3/kapt3-compiler/testData/converter/strangeIdentifiers.kt index a4a659099a1..444e65c9b9b 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/strangeIdentifiers.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/strangeIdentifiers.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + class `:)` { lateinit val f: String } @@ -37,4 +39,4 @@ class `A B` { class C } -// EXPECTED_ERROR(other:-1:-1) '60x60' is an invalid Java enum value name \ No newline at end of file +// EXPECTED_ERROR(other:-1:-1) '60x60' is an invalid Java enum value name diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/strangeNames.kt b/plugins/kapt3/kapt3-compiler/testData/converter/strangeNames.kt index 4d9eb6f5b5f..f66ab817778 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/strangeNames.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/strangeNames.kt @@ -9,4 +9,4 @@ class `My $ name` { // japanese hiragana fun `こ と り ん!`() {} -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/stripMetadata.kt b/plugins/kapt3/kapt3-compiler/testData/converter/stripMetadata.kt index 7341ac4616a..cbe13881c46 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/stripMetadata.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/stripMetadata.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // STRIP_METADATA interface Context @@ -12,4 +13,4 @@ abstract class BaseClass(context: Context, num: Int, bool: Boolean) { class Inheritor(context: Context) : BaseClass(context, 5, true) { override fun doJob() = Result.SUCCESS -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/suspendArgName.kt b/plugins/kapt3/kapt3-compiler/testData/converter/suspendArgName.kt index 619a93fb5ea..bb6e78c2766 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/suspendArgName.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/suspendArgName.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + open class Test { open fun getTestNoSuspend(text: String): String { diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/suspendErrorTypes.kt b/plugins/kapt3/kapt3-compiler/testData/converter/suspendErrorTypes.kt index 26bb12e55ae..a1f3dc171ee 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/suspendErrorTypes.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/suspendErrorTypes.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // CORRECT_ERROR_TYPES // NO_VALIDATION // WITH_STDLIB @@ -7,4 +8,4 @@ class Foo { suspend fun a(): ABC = TODO() suspend fun b(): Result = TODO() -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/topLevel.kt b/plugins/kapt3/kapt3-compiler/testData/converter/topLevel.kt index e83faceadc3..36f7da0de23 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/topLevel.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/topLevel.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + package test.another annotation class Anno(val value: String) @@ -20,4 +22,4 @@ fun @receiver:Anno("rec") String.extensionFunction(@Anno("1") a: String, @Anno(" @Anno("extpr") var @receiver:Anno("propRec") T.extensionProperty: String get() = "" - set(@Anno("setparam") setParamName) {} \ No newline at end of file + set(@Anno("setparam") setParamName) {} diff --git a/plugins/kapt3/kapt3-compiler/testData/converter/unsafePropertyInitializers.kt b/plugins/kapt3/kapt3-compiler/testData/converter/unsafePropertyInitializers.kt index a4545394218..299d5002900 100644 --- a/plugins/kapt3/kapt3-compiler/testData/converter/unsafePropertyInitializers.kt +++ b/plugins/kapt3/kapt3-compiler/testData/converter/unsafePropertyInitializers.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + object Foo { const val aString: String = "foo" const val aInt: Int = 3 @@ -42,4 +44,4 @@ class HavingState { enum class State { START, FINISH, -} \ No newline at end of file +} diff --git a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/DefaultParameterValues.kt b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/DefaultParameterValues.kt index 720090640bc..73f1d47aecf 100644 --- a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/DefaultParameterValues.kt +++ b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/DefaultParameterValues.kt @@ -1,3 +1,4 @@ +// IGNORE_BACKEND: JVM_IR // DUMP_DEFAULT_PARAMETER_VALUES package test @@ -5,4 +6,4 @@ package test @Anno class User(val name: String = "John", age: Int = 18) -internal annotation class Anno \ No newline at end of file +internal annotation class Anno diff --git a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/ErrorLocationMapping.kt b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/ErrorLocationMapping.kt index 348bc80e88c..6390174e10f 100644 --- a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/ErrorLocationMapping.kt +++ b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/ErrorLocationMapping.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + class Subject { @@ -8,4 +10,4 @@ class Subject { val annotationTrigger: String = "" } -internal annotation class MyAnnotation \ No newline at end of file +internal annotation class MyAnnotation diff --git a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/NestedClasses.kt b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/NestedClasses.kt index 9e8cf0f45a5..2328189bfcc 100644 --- a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/NestedClasses.kt +++ b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/NestedClasses.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + package test internal class Simple { @@ -12,4 +14,4 @@ internal class Simple { companion object } -internal annotation class MyAnnotation \ No newline at end of file +internal annotation class MyAnnotation diff --git a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Overloads.kt b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Overloads.kt index adc3cadb54f..0fd369c8783 100644 --- a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Overloads.kt +++ b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Overloads.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + package test internal annotation class MyAnnotation @@ -7,4 +9,4 @@ internal class State @JvmOverloads constructor( val someInt: Int, val someLong: Long, val someString: String = "" -) \ No newline at end of file +) diff --git a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.kt b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.kt index 4aa8c9e1260..993aa8cb7eb 100644 --- a/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.kt +++ b/plugins/kapt3/kapt3-compiler/testData/kotlinRunner/Simple.kt @@ -1,3 +1,5 @@ +// IGNORE_BACKEND: JVM_IR + package test /** @@ -30,4 +32,4 @@ internal enum class EnumClass { internal enum class EnumClass2 private constructor(private val blah: String) { WHITE("A"), RED("B") -} \ No newline at end of file +}