From d668808b44083ed33b5f5e2955597e1136a85e6d Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Thu, 5 Mar 2020 01:24:31 +0100 Subject: [PATCH] Migrate Experimental->RequiresOptIn in project sources --- compiler/cli/cli-js-klib/src/GenerateJsIrKlib.kt | 4 ++-- .../resolve/src/org/jetbrains/kotlin/fir/PrivateForInline.kt | 4 ++-- .../src/org/jetbrains/kotlin/fir/resolve/dfa/DfaInternals.kt | 4 ++-- .../src/org/jetbrains/kotlin/fir/FirImplementationDetail.kt | 4 ++-- compiler/testData/codegen/box/inference/kt35684.kt | 2 +- .../coroutines/inference/variableOfAFunctionTypeCall.kt | 2 +- .../src/org/jetbrains/kotlin/types/refinement/annotations.kt | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/compiler/cli/cli-js-klib/src/GenerateJsIrKlib.kt b/compiler/cli/cli-js-klib/src/GenerateJsIrKlib.kt index a3a64f22677..967e9744aa6 100644 --- a/compiler/cli/cli-js-klib/src/GenerateJsIrKlib.kt +++ b/compiler/cli/cli-js-klib/src/GenerateJsIrKlib.kt @@ -41,9 +41,9 @@ fun buildConfiguration(environment: KotlinCoreEnvironment, moduleName: String): ), analysisFlags = mapOf( AnalysisFlags.useExperimental to listOf( + "kotlin.RequiresOptIn", "kotlin.contracts.ExperimentalContracts", - "kotlin.Experimental", - "kotlin.ExperimentalMultiplatform" + "kotlin.ExperimentalMultiplatform", ), AnalysisFlags.allowResultReturnType to true ) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/PrivateForInline.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/PrivateForInline.kt index aa2ddb21af4..2c639dc8868 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/PrivateForInline.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/PrivateForInline.kt @@ -5,5 +5,5 @@ package org.jetbrains.kotlin.fir -@Experimental(level = Experimental.Level.ERROR) -annotation class PrivateForInline \ No newline at end of file +@RequiresOptIn(level = RequiresOptIn.Level.ERROR) +annotation class PrivateForInline diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/DfaInternals.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/DfaInternals.kt index 17aedc20c9f..39ef8b1f3ed 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/DfaInternals.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/DfaInternals.kt @@ -5,5 +5,5 @@ package org.jetbrains.kotlin.fir.resolve.dfa -@Experimental -annotation class DfaInternals \ No newline at end of file +@RequiresOptIn +annotation class DfaInternals diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirImplementationDetail.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirImplementationDetail.kt index ebe9450013c..190e55419ec 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirImplementationDetail.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/FirImplementationDetail.kt @@ -5,5 +5,5 @@ package org.jetbrains.kotlin.fir -@Experimental(level = Experimental.Level.ERROR) -annotation class FirImplementationDetail \ No newline at end of file +@RequiresOptIn(level = RequiresOptIn.Level.ERROR) +annotation class FirImplementationDetail diff --git a/compiler/testData/codegen/box/inference/kt35684.kt b/compiler/testData/codegen/box/inference/kt35684.kt index 849bfea5dd1..e5e1ef92214 100644 --- a/compiler/testData/codegen/box/inference/kt35684.kt +++ b/compiler/testData/codegen/box/inference/kt35684.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +NewInference -// !USE_EXPERIMENTAL: kotlin.Experimental +// !USE_EXPERIMENTAL: kotlin.RequiresOptIn // WITH_RUNTIME // ISSUE: KT-35684 diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/variableOfAFunctionTypeCall.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/variableOfAFunctionTypeCall.kt index 1ad60cefafc..04ad43ef3a2 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/variableOfAFunctionTypeCall.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/variableOfAFunctionTypeCall.kt @@ -1,4 +1,4 @@ -// !USE_EXPERIMENTAL: kotlin.Experimental +// !USE_EXPERIMENTAL: kotlin.RequiresOptIn // !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE @file:OptIn(ExperimentalTypeInference::class) diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/refinement/annotations.kt b/core/descriptors/src/org/jetbrains/kotlin/types/refinement/annotations.kt index dbc7f64c3ef..27d5c4b9e22 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/refinement/annotations.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/refinement/annotations.kt @@ -17,7 +17,7 @@ package org.jetbrains.kotlin.types.refinement * either finding some other API or removing @TypeRefinement (and thus "publishing" * API for broader use) */ -@Experimental(level = Experimental.Level.ERROR) +@RequiresOptIn(level = RequiresOptIn.Level.ERROR) @Retention(AnnotationRetention.BINARY) @Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY) annotation class TypeRefinement