diff --git a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/ChangeBoxingMethodTransformer.kt b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/ChangeBoxingMethodTransformer.kt index 575c4f35ef2..2fb81f52c08 100644 --- a/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/ChangeBoxingMethodTransformer.kt +++ b/compiler/backend/src/org/jetbrains/kotlin/codegen/coroutines/ChangeBoxingMethodTransformer.kt @@ -20,7 +20,7 @@ import java.util.* private val BOXING_CLASS_INTERNAL_NAME = RELEASE_COROUTINES_VERSION_SETTINGS.coroutinesJvmInternalPackageFqName().child(Name.identifier("Boxing")).topLevelClassInternalName() -@UseExperimental(ExperimentalStdlibApi::class) +@OptIn(ExperimentalStdlibApi::class) object ChangeBoxingMethodTransformer : MethodTransformer() { private val wrapperToInternalBoxing: Map diff --git a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/TypeRenderer.kt b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/TypeRenderer.kt index d3e9fe828d3..4cc2103549d 100644 --- a/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/TypeRenderer.kt +++ b/compiler/fir/cones/src/org/jetbrains/kotlin/fir/types/TypeRenderer.kt @@ -82,7 +82,7 @@ fun ConeKotlinType.renderFunctionType(kind: FunctionClassDescriptor.Kind?, isExt } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) fun FunctionClassDescriptor.Kind?.withPrettyRender(): Boolean { contract { returns(true) implies (this@withPrettyRender != null) diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaClass.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaClass.kt index 17d29a82bfd..e15817f234c 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaClass.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaClass.kt @@ -28,7 +28,7 @@ import org.jetbrains.kotlin.fir.visitors.transformSingle import org.jetbrains.kotlin.name.Name import kotlin.properties.Delegates -@UseExperimental(FirImplementationDetail::class) +@OptIn(FirImplementationDetail::class) class FirJavaClass @FirImplementationDetail internal constructor( override val source: FirSourceElement?, override val session: FirSession, @@ -111,7 +111,7 @@ internal class FirJavaClassBuilder : AbstractFirRegularClassBuilder, FirAnnotati override val superTypeRefs: MutableList = mutableListOf() - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirJavaClass { val status = FirDeclarationStatusImpl(visibility, modality).apply { isInner = !isTopLevel && !isStatic diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaConstructor.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaConstructor.kt index 521509dfe33..8d4b8140c1e 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaConstructor.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaConstructor.kt @@ -26,7 +26,7 @@ import org.jetbrains.kotlin.fir.visitors.transformSingle import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedContainerSource import kotlin.properties.Delegates -@UseExperimental(FirImplementationDetail::class) +@OptIn(FirImplementationDetail::class) class FirJavaConstructor @FirImplementationDetail constructor( override val source: FirSourceElement?, override val session: FirSession, @@ -119,7 +119,7 @@ class FirJavaConstructorBuilder : FirConstructorBuilder() { var isInner: Boolean by Delegates.notNull() var isPrimary: Boolean by Delegates.notNull() - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirJavaConstructor { val status = FirDeclarationStatusImpl(visibility, Modality.FINAL).apply { isExpect = false diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaField.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaField.kt index baeea1065ae..1634cc93670 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaField.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaField.kt @@ -30,7 +30,7 @@ import kotlin.contracts.InvocationKind import kotlin.contracts.contract import kotlin.properties.Delegates -@UseExperimental(FirImplementationDetail::class) +@OptIn(FirImplementationDetail::class) class FirJavaField @FirImplementationDetail constructor( override val source: FirSourceElement?, override val session: FirSession, @@ -130,7 +130,7 @@ internal class FirJavaFieldBuilder : FirFieldBuilder() { override var resolvePhase: FirResolvePhase = FirResolvePhase.ANALYZED_DEPENDENCIES - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirJavaField { val status: FirDeclarationStatus = FirDeclarationStatusImpl(visibility, modality).apply { isStatic = this@FirJavaFieldBuilder.isStatic @@ -154,7 +154,7 @@ internal class FirJavaFieldBuilder : FirFieldBuilder() { } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) internal inline fun buildJavaField(init: FirJavaFieldBuilder.() -> Unit): FirJavaField { contract { callsInPlace(init, InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaMethod.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaMethod.kt index 4ad542ba032..bbd7ed9eabb 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaMethod.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaMethod.kt @@ -38,7 +38,7 @@ import org.jetbrains.kotlin.util.OperatorNameConventions.SET import org.jetbrains.kotlin.util.OperatorNameConventions.UNARY_OPERATION_NAMES import kotlin.properties.Delegates -@UseExperimental(FirImplementationDetail::class) +@OptIn(FirImplementationDetail::class) class FirJavaMethod @FirImplementationDetail constructor( source: FirSourceElement?, session: FirSession, @@ -80,7 +80,7 @@ class FirJavaMethodBuilder : FirSimpleFunctionBuilder() { var isStatic: Boolean by Delegates.notNull() override var resolvePhase: FirResolvePhase = FirResolvePhase.ANALYZED_DEPENDENCIES - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirJavaMethod { val status = FirDeclarationStatusImpl(visibility, modality).apply { isStatic = this@FirJavaMethodBuilder.isStatic diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaValueParameter.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaValueParameter.kt index 82a3fa6595e..bd8e55db706 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaValueParameter.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/java/declarations/FirJavaValueParameter.kt @@ -19,7 +19,7 @@ import org.jetbrains.kotlin.fir.symbols.impl.FirVariableSymbol import org.jetbrains.kotlin.fir.types.FirTypeRef import org.jetbrains.kotlin.name.Name -@UseExperimental(FirImplementationDetail::class) +@OptIn(FirImplementationDetail::class) class FirJavaValueParameter @FirImplementationDetail constructor( source: FirSourceElement?, session: FirSession, @@ -48,7 +48,7 @@ class FirJavaValueParameter @FirImplementationDetail constructor( @FirBuilderDsl class FirJavaValueParameterBuilder : FirValueParameterBuilder() { - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirJavaValueParameter { return FirJavaValueParameter( source, diff --git a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/BaseConverter.kt b/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/BaseConverter.kt index c37b1962339..86b089e9036 100644 --- a/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/BaseConverter.kt +++ b/compiler/fir/lightTree/src/org/jetbrains/kotlin/fir/lightTree/converter/BaseConverter.kt @@ -106,7 +106,7 @@ open class BaseConverter( return kidsRef.get() } - @UseExperimental(ExperimentalContracts::class) + @OptIn(ExperimentalContracts::class) protected inline fun LighterASTNode.forEachChildren(vararg skipTokens: KtToken, f: (LighterASTNode) -> Unit) { val kidsArray = this.getChildrenAsArray() for (kid in kidsArray) { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CheckerSink.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CheckerSink.kt index c62e315260d..fc3f2e15e6e 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CheckerSink.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/CheckerSink.kt @@ -20,7 +20,7 @@ abstract class CheckerSink { abstract suspend fun yield() } -@UseExperimental(PrivateForInline::class) +@OptIn(PrivateForInline::class) suspend inline fun CheckerSink.yieldIfNeed() { if (needYielding) { yield() diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/FirNamedReferenceWithCandidate.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/FirNamedReferenceWithCandidate.kt index 6308a97f800..c9f95ab5ab7 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/FirNamedReferenceWithCandidate.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/FirNamedReferenceWithCandidate.kt @@ -11,7 +11,7 @@ import org.jetbrains.kotlin.fir.references.impl.FirSimpleNamedReference import org.jetbrains.kotlin.fir.symbols.AbstractFirBasedSymbol import org.jetbrains.kotlin.name.Name -@UseExperimental(FirImplementationDetail::class) +@OptIn(FirImplementationDetail::class) class FirNamedReferenceWithCandidate( source: FirSourceElement?, name: Name, diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt index 2ab55a6bdea..6d363afe64e 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/FirDataFlowAnalyzer.kt @@ -29,7 +29,7 @@ import org.jetbrains.kotlin.fir.visitors.transformSingle import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name -@UseExperimental(DfaInternals::class) +@OptIn(DfaInternals::class) abstract class FirDataFlowAnalyzer( protected val components: FirAbstractBodyResolveTransformer.BodyResolveTransformerComponents ) { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/PersistentLogicSystem.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/PersistentLogicSystem.kt index badb441b6e1..c83c5050f54 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/PersistentLogicSystem.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/PersistentLogicSystem.kt @@ -163,7 +163,7 @@ abstract class PersistentLogicSystem(context: ConeInferenceContext) : LogicSyste flow.backwardsAliasMap = flow.backwardsAliasMap.put(original, variables - alias) } - @UseExperimental(DfaInternals::class) + @OptIn(DfaInternals::class) private fun PersistentFlow.getApprovedTypeStatementsDiff(variable: RealVariable, parentFlow: PersistentFlow): MutableTypeStatement { var flow = this val result = MutableTypeStatement(variable) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/VariableStorage.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/VariableStorage.kt index 662f8ac984b..145298ce4e8 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/VariableStorage.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/VariableStorage.kt @@ -24,7 +24,7 @@ import org.jetbrains.kotlin.fir.types.* import kotlin.contracts.ExperimentalContracts import kotlin.contracts.contract -@UseExperimental(DfaInternals::class) +@OptIn(DfaInternals::class) class VariableStorage(val session: FirSession) { private var counter = 1 private val realVariables: MutableMap = HashMap() @@ -149,7 +149,7 @@ class VariableStorage(val session: FirSession) { syntheticVariables.clear() } - @UseExperimental(ExperimentalContracts::class) + @OptIn(ExperimentalContracts::class) fun AbstractFirBasedSymbol<*>?.isStable(originalFir: FirElement): Boolean { contract { returns(true) implies(this@isStable != null) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/util.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/util.kt index 64b479f30b9..a3c6006f497 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/util.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/dfa/util.kt @@ -32,7 +32,7 @@ import kotlin.contracts.ExperimentalContracts import kotlin.contracts.InvocationKind import kotlin.contracts.contract -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) fun DataFlowVariable.isSynthetic(): Boolean { contract { returns(true) implies (this@isSynthetic is SyntheticVariable) @@ -41,7 +41,7 @@ fun DataFlowVariable.isSynthetic(): Boolean { return this is SyntheticVariable } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) fun DataFlowVariable.isReal(): Boolean { contract { returns(true) implies (this@isReal is RealVariable) @@ -62,7 +62,7 @@ fun MutableTypeStatements.mergeTypeStatements(other: TypeStatements) { } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) internal inline fun MutableMap.put(key: K, value: V, remappingFunction: (existing: V) -> V) { contract { callsInPlace(remappingFunction, InvocationKind.AT_MOST_ONCE) @@ -75,7 +75,7 @@ internal inline fun MutableMap.put(key: K, value: V, remappingFunct } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) internal inline fun PersistentMap.put(key: K, valueProducer: () -> V, remappingFunction: (existing: V) -> V): PersistentMap { contract { callsInPlace(remappingFunction, InvocationKind.AT_MOST_ONCE) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/InferenceComponents.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/InferenceComponents.kt index 5bb61f4b627..92a18b9a0f5 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/InferenceComponents.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/InferenceComponents.kt @@ -41,7 +41,7 @@ class InferenceComponents( @set:PrivateForInline var inferenceSession: FirInferenceSession = FirInferenceSession.DEFAULT - @UseExperimental(PrivateForInline::class) + @OptIn(PrivateForInline::class) inline fun withInferenceSession(inferenceSession: FirInferenceSession, block: () -> R): R { val oldSession = this.inferenceSession this.inferenceSession = inferenceSession diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/IntegerLiteralTypeApproximationTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/IntegerLiteralTypeApproximationTransformer.kt index 77a7ab457cb..2ef804663a3 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/IntegerLiteralTypeApproximationTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/IntegerLiteralTypeApproximationTransformer.kt @@ -196,7 +196,7 @@ class IntegerOperatorsTypeUpdater(val approximator: IntegerLiteralTypeApproximat } } -@UseExperimental(FirImplementationDetail::class) +@OptIn(FirImplementationDetail::class) private fun FirFunctionCall.toOperatorCall(): FirIntegerOperatorCall { if (this is FirIntegerOperatorCall) return this return FirIntegerOperatorCall( diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirAbstractBodyResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirAbstractBodyResolveTransformer.kt index 6323d940509..080ba1179b5 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirAbstractBodyResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirAbstractBodyResolveTransformer.kt @@ -60,7 +60,7 @@ abstract class FirAbstractBodyResolveTransformer(phase: FirResolvePhase) : FirAb } - @UseExperimental(PrivateForInline::class) + @OptIn(PrivateForInline::class) internal inline fun withFullBodyResolve(crossinline l: () -> T): T { if (!implicitTypeOnly) return l() implicitTypeOnly = false @@ -149,11 +149,11 @@ abstract class FirAbstractBodyResolveTransformer(phase: FirResolvePhase) : FirAb override var container: FirDeclaration get() = containerIfAny!! private set(value) { - @UseExperimental(PrivateForInline::class) + @OptIn(PrivateForInline::class) containerIfAny = value } - @UseExperimental(PrivateForInline::class) + @OptIn(PrivateForInline::class) inline fun withContainer(declaration: FirDeclaration, crossinline f: () -> T): T { val prevContainer = containerIfAny containerIfAny = declaration @@ -162,7 +162,7 @@ abstract class FirAbstractBodyResolveTransformer(phase: FirResolvePhase) : FirAb return result } - @UseExperimental(PrivateForInline::class) + @OptIn(PrivateForInline::class) inline fun withLocalContext(localContext: FirLocalContext, f: () -> T): T { val existedStack = this.implicitReceiverStack val existedLocalScopes = this.localScopes @@ -178,7 +178,7 @@ abstract class FirAbstractBodyResolveTransformer(phase: FirResolvePhase) : FirAb } } - @UseExperimental(PrivateForInline::class) + @OptIn(PrivateForInline::class) inline fun withLocalScopesCleanup(l: () -> R): R { val initialLocalScopes = localScopes return try { @@ -188,7 +188,7 @@ abstract class FirAbstractBodyResolveTransformer(phase: FirResolvePhase) : FirAb } } - @UseExperimental(PrivateForInline::class) + @OptIn(PrivateForInline::class) fun addLocalScope(localScope: FirLocalScope) { localScopes = localScopes.add(localScope) } @@ -221,7 +221,7 @@ abstract class FirAbstractBodyResolveTransformer(phase: FirResolvePhase) : FirAb localContextForAnonymousFunctions.clear() } - @UseExperimental(PrivateForInline::class) + @OptIn(PrivateForInline::class) private inline fun updateLastScope(transform: FirLocalScope.() -> FirLocalScope) { val lastScope = localScopes.lastOrNull() ?: return localScopes = localScopes.set(localScopes.size - 1, lastScope.transform()) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirBodyResolveTransformer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirBodyResolveTransformer.kt index 1e9f61553d8..e71e1ffdb8c 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirBodyResolveTransformer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/FirBodyResolveTransformer.kt @@ -38,7 +38,7 @@ open class FirBodyResolveTransformer( override fun transformFile(file: FirFile, data: ResolutionMode): CompositeTransformResult { components.cleanContextForAnonymousFunction() - @UseExperimental(PrivateForInline::class) + @OptIn(PrivateForInline::class) components.file = file packageFqName = file.packageFqName return withScopeCleanup(components.topLevelScopes) { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirIntegerLiteralTypeScope.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirIntegerLiteralTypeScope.kt index 2f4fd69d08f..6dc718ed450 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirIntegerLiteralTypeScope.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirIntegerLiteralTypeScope.kt @@ -95,7 +95,7 @@ class FirIntegerLiteralTypeScope(private val session: FirSession) : FirScope() { name to FirNamedFunctionSymbol(CallableId(name)).apply { createFirFunction(name, this) } }.toMap() - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) private fun createFirFunction(name: Name, symbol: FirNamedFunctionSymbol): FirSimpleFunctionImpl = FirIntegerOperator( source = null, session, @@ -123,7 +123,7 @@ class FirIntegerLiteralTypeScope(private val session: FirSession) : FirScope() { } } -@UseExperimental(FirImplementationDetail::class) +@OptIn(FirImplementationDetail::class) class FirIntegerOperator @FirImplementationDetail constructor( source: FirSourceElement?, session: FirSession, diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirIntegerOperatorCall.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirIntegerOperatorCall.kt index 78f7db0aa32..77d7c460346 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirIntegerOperatorCall.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/scopes/impl/FirIntegerOperatorCall.kt @@ -22,7 +22,7 @@ import org.jetbrains.kotlin.fir.types.FirTypeProjection import org.jetbrains.kotlin.fir.types.FirTypeRef import org.jetbrains.kotlin.fir.types.builder.buildImplicitTypeRef -@UseExperimental(FirImplementationDetail::class) +@OptIn(FirImplementationDetail::class) class FirIntegerOperatorCall @FirImplementationDetail constructor( source: FirSourceElement?, typeRef: FirTypeRef, @@ -60,7 +60,7 @@ class FirIntegerOperatorCallBuilder : FirQualifiedAccessBuilder, FirCallBuilder, override val arguments: MutableList = mutableListOf() lateinit var calleeReference: FirNamedReference - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirIntegerOperatorCall { return FirIntegerOperatorCall( source, diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/builder/FirLabelBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/builder/FirLabelBuilder.kt index 581888db588..63d0eddf1b7 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/builder/FirLabelBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/builder/FirLabelBuilder.kt @@ -31,7 +31,7 @@ class FirLabelBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildLabel(init: FirLabelBuilder.() -> Unit): FirLabel { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/contracts/builder/FirContractDescriptionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/contracts/builder/FirContractDescriptionBuilder.kt index 1b8749a5b4d..f5fad6d7f57 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/contracts/builder/FirContractDescriptionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/contracts/builder/FirContractDescriptionBuilder.kt @@ -32,7 +32,7 @@ class FirContractDescriptionBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildContractDescription(init: FirContractDescriptionBuilder.() -> Unit = {}): FirContractDescription { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousFunctionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousFunctionBuilder.kt index 1ba61d629d8..7fb44922a48 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousFunctionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousFunctionBuilder.kt @@ -71,7 +71,7 @@ class FirAnonymousFunctionBuilder : FirFunctionBuilder, FirAnnotationContainerBu } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildAnonymousFunction(init: FirAnonymousFunctionBuilder.() -> Unit): FirAnonymousFunction { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousInitializerBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousInitializerBuilder.kt index 95a8e8cb8e1..ec983d95380 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousInitializerBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousInitializerBuilder.kt @@ -38,7 +38,7 @@ class FirAnonymousInitializerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildAnonymousInitializer(init: FirAnonymousInitializerBuilder.() -> Unit): FirAnonymousInitializer { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousObjectBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousObjectBuilder.kt index c69ca05da2b..b1bd3cebbda 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousObjectBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirAnonymousObjectBuilder.kt @@ -59,7 +59,7 @@ class FirAnonymousObjectBuilder : FirClassBuilder, FirAnnotationContainerBuilder } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildAnonymousObject(init: FirAnonymousObjectBuilder.() -> Unit): FirAnonymousObject { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirClassImplBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirClassImplBuilder.kt index 02e925affe8..7e32f9d5a2f 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirClassImplBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirClassImplBuilder.kt @@ -73,7 +73,7 @@ open class FirClassImplBuilder : AbstractFirRegularClassBuilder, FirAnnotationCo } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildClassImpl(init: FirClassImplBuilder.() -> Unit): FirRegularClass { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirConstructorBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirConstructorBuilder.kt index 871294c679b..ea3acba974f 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirConstructorBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirConstructorBuilder.kt @@ -75,7 +75,7 @@ open class FirConstructorBuilder : FirAbstractConstructorBuilder, FirAnnotationC } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildConstructor(init: FirConstructorBuilder.() -> Unit): FirConstructor { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirDefaultSetterValueParameterBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirDefaultSetterValueParameterBuilder.kt index c5e31a5b629..4dc0e834f47 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirDefaultSetterValueParameterBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirDefaultSetterValueParameterBuilder.kt @@ -73,7 +73,7 @@ class FirDefaultSetterValueParameterBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildDefaultSetterValueParameter(init: FirDefaultSetterValueParameterBuilder.() -> Unit): FirValueParameter { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirEnumEntryBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirEnumEntryBuilder.kt index 2739b936767..d00734f02f1 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirEnumEntryBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirEnumEntryBuilder.kt @@ -62,7 +62,7 @@ class FirEnumEntryBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildEnumEntry(init: FirEnumEntryBuilder.() -> Unit): FirEnumEntry { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirErrorFunctionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirErrorFunctionBuilder.kt index e04c43d94fb..c2a5f495a96 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirErrorFunctionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirErrorFunctionBuilder.kt @@ -56,7 +56,7 @@ class FirErrorFunctionBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildErrorFunction(init: FirErrorFunctionBuilder.() -> Unit): FirErrorFunction { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirFieldBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirFieldBuilder.kt index 4d4e27b3940..f44481f1760 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirFieldBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirFieldBuilder.kt @@ -62,7 +62,7 @@ open class FirFieldBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildField(init: FirFieldBuilder.() -> Unit): FirField { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirFileBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirFileBuilder.kt index cb371aaa71c..d871b238f18 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirFileBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirFileBuilder.kt @@ -50,7 +50,7 @@ class FirFileBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildFile(init: FirFileBuilder.() -> Unit): FirFile { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirImportBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirImportBuilder.kt index f0f2972cae2..dffdd2475e9 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirImportBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirImportBuilder.kt @@ -37,7 +37,7 @@ class FirImportBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildImport(init: FirImportBuilder.() -> Unit): FirImport { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirPrimaryConstructorBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirPrimaryConstructorBuilder.kt index bfcc8ea695d..b7e02935403 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirPrimaryConstructorBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirPrimaryConstructorBuilder.kt @@ -75,7 +75,7 @@ class FirPrimaryConstructorBuilder : FirAbstractConstructorBuilder, FirAnnotatio } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildPrimaryConstructor(init: FirPrimaryConstructorBuilder.() -> Unit): FirConstructor { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirPropertyAccessorBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirPropertyAccessorBuilder.kt index c6157a3072f..bd2e450980f 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirPropertyAccessorBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirPropertyAccessorBuilder.kt @@ -48,7 +48,7 @@ class FirPropertyAccessorBuilder : FirFunctionBuilder, FirAnnotationContainerBui lateinit var status: FirDeclarationStatus override val annotations: MutableList = mutableListOf() - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirPropertyAccessor { return FirPropertyAccessorImpl( source, @@ -67,7 +67,7 @@ class FirPropertyAccessorBuilder : FirFunctionBuilder, FirAnnotationContainerBui } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildPropertyAccessor(init: FirPropertyAccessorBuilder.() -> Unit): FirPropertyAccessor { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirPropertyBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirPropertyBuilder.kt index 6c637ef203d..a7c1de9603e 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirPropertyBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirPropertyBuilder.kt @@ -80,7 +80,7 @@ class FirPropertyBuilder : FirTypeParametersOwnerBuilder, FirAnnotationContainer } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildProperty(init: FirPropertyBuilder.() -> Unit): FirProperty { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirResolvedImportBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirResolvedImportBuilder.kt index d9d0006afcb..ea774c00db4 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirResolvedImportBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirResolvedImportBuilder.kt @@ -37,7 +37,7 @@ class FirResolvedImportBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildResolvedImport(init: FirResolvedImportBuilder.() -> Unit): FirResolvedImport { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirSealedClassBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirSealedClassBuilder.kt index 6d86b9a3d88..67d351edbb9 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirSealedClassBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirSealedClassBuilder.kt @@ -77,7 +77,7 @@ class FirSealedClassBuilder : AbstractFirRegularClassBuilder, FirAnnotationConta } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildSealedClass(init: FirSealedClassBuilder.() -> Unit): FirSealedClass { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirSimpleFunctionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirSimpleFunctionBuilder.kt index 8affe2d52dd..40e83d23d54 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirSimpleFunctionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirSimpleFunctionBuilder.kt @@ -52,7 +52,7 @@ open class FirSimpleFunctionBuilder : FirFunctionBuilder, FirTypeParametersOwner open lateinit var symbol: FirFunctionSymbol override val annotations: MutableList = mutableListOf() - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirSimpleFunction { return FirSimpleFunctionImpl( source, @@ -73,7 +73,7 @@ open class FirSimpleFunctionBuilder : FirFunctionBuilder, FirTypeParametersOwner } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildSimpleFunction(init: FirSimpleFunctionBuilder.() -> Unit): FirSimpleFunction { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirTypeAliasBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirTypeAliasBuilder.kt index 06853358c68..b873e72f6e2 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirTypeAliasBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirTypeAliasBuilder.kt @@ -55,7 +55,7 @@ class FirTypeAliasBuilder : FirTypeParametersOwnerBuilder, FirAnnotationContaine } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildTypeAlias(init: FirTypeAliasBuilder.() -> Unit): FirTypeAlias { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirTypeParameterBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirTypeParameterBuilder.kt index 8801a0544a8..355afe81f25 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirTypeParameterBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirTypeParameterBuilder.kt @@ -53,7 +53,7 @@ class FirTypeParameterBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildTypeParameter(init: FirTypeParameterBuilder.() -> Unit): FirTypeParameter { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirValueParameterBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirValueParameterBuilder.kt index 47830c2fca7..87ceddaf8fb 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirValueParameterBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/declarations/builder/FirValueParameterBuilder.kt @@ -42,7 +42,7 @@ open class FirValueParameterBuilder : FirAnnotationContainerBuilder { open var isNoinline: Boolean by kotlin.properties.Delegates.notNull() open var isVararg: Boolean by kotlin.properties.Delegates.notNull() - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirValueParameter { return FirValueParameterImpl( source, @@ -61,7 +61,7 @@ open class FirValueParameterBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildValueParameter(init: FirValueParameterBuilder.() -> Unit): FirValueParameter { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirAnnotationCallBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirAnnotationCallBuilder.kt index 507be340165..03abf7769eb 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirAnnotationCallBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirAnnotationCallBuilder.kt @@ -50,7 +50,7 @@ class FirAnnotationCallBuilder : FirCallBuilder, FirAnnotationContainerBuilder, } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildAnnotationCall(init: FirAnnotationCallBuilder.() -> Unit): FirAnnotationCall { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirArrayOfCallBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirArrayOfCallBuilder.kt index 5300f9be9b5..bfe312ceb47 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirArrayOfCallBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirArrayOfCallBuilder.kt @@ -47,7 +47,7 @@ class FirArrayOfCallBuilder : FirCallBuilder, FirAnnotationContainerBuilder, Fir } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildArrayOfCall(init: FirArrayOfCallBuilder.() -> Unit = {}): FirArrayOfCall { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirArraySetCallBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirArraySetCallBuilder.kt index 22e061f3459..f9464ed5941 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirArraySetCallBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirArraySetCallBuilder.kt @@ -58,7 +58,7 @@ class FirArraySetCallBuilder : FirQualifiedAccessBuilder, FirAnnotationContainer } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildArraySetCall(init: FirArraySetCallBuilder.() -> Unit): FirArraySetCall { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirBinaryLogicExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirBinaryLogicExpressionBuilder.kt index 12637757b6c..584b210af1a 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirBinaryLogicExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirBinaryLogicExpressionBuilder.kt @@ -51,7 +51,7 @@ class FirBinaryLogicExpressionBuilder : FirAnnotationContainerBuilder, FirExpres } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildBinaryLogicExpression(init: FirBinaryLogicExpressionBuilder.() -> Unit): FirBinaryLogicExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirBlockBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirBlockBuilder.kt index c5c9d1c5f67..2cea870f1e3 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirBlockBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirBlockBuilder.kt @@ -46,7 +46,7 @@ class FirBlockBuilder : FirAnnotationContainerBuilder, FirExpressionBuilder { } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildBlock(init: FirBlockBuilder.() -> Unit = {}): FirBlock { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirBreakExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirBreakExpressionBuilder.kt index a79baf2cbae..d3f0070be77 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirBreakExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirBreakExpressionBuilder.kt @@ -48,7 +48,7 @@ class FirBreakExpressionBuilder : FirLoopJumpBuilder, FirAnnotationContainerBuil } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildBreakExpression(init: FirBreakExpressionBuilder.() -> Unit): FirBreakExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirCallableReferenceAccessBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirCallableReferenceAccessBuilder.kt index d5251f90a2f..654e337a978 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirCallableReferenceAccessBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirCallableReferenceAccessBuilder.kt @@ -56,7 +56,7 @@ class FirCallableReferenceAccessBuilder : FirQualifiedAccessBuilder, FirAnnotati } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildCallableReferenceAccess(init: FirCallableReferenceAccessBuilder.() -> Unit): FirCallableReferenceAccess { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirCatchBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirCatchBuilder.kt index 8a5c48aa889..8d31fc3b29b 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirCatchBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirCatchBuilder.kt @@ -35,7 +35,7 @@ class FirCatchBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildCatch(init: FirCatchBuilder.() -> Unit): FirCatch { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirCheckNotNullCallBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirCheckNotNullCallBuilder.kt index 75bcad88595..9d5bf02b760 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirCheckNotNullCallBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirCheckNotNullCallBuilder.kt @@ -45,7 +45,7 @@ class FirCheckNotNullCallBuilder : FirAnnotationContainerBuilder, FirExpressionB } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildCheckNotNullCall(init: FirCheckNotNullCallBuilder.() -> Unit = {}): FirCheckNotNullCall { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirClassReferenceExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirClassReferenceExpressionBuilder.kt index 52337b6b064..b3bd3cc94c4 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirClassReferenceExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirClassReferenceExpressionBuilder.kt @@ -45,7 +45,7 @@ class FirClassReferenceExpressionBuilder : FirAnnotationContainerBuilder, FirExp } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildClassReferenceExpression(init: FirClassReferenceExpressionBuilder.() -> Unit): FirClassReferenceExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirComparisonExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirComparisonExpressionBuilder.kt index 59757ec373e..5106e5c3521 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirComparisonExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirComparisonExpressionBuilder.kt @@ -49,7 +49,7 @@ class FirComparisonExpressionBuilder : FirAnnotationContainerBuilder, FirExpress } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildComparisonExpression(init: FirComparisonExpressionBuilder.() -> Unit): FirComparisonExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirComponentCallBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirComponentCallBuilder.kt index ae330702eac..40b671218d0 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirComponentCallBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirComponentCallBuilder.kt @@ -59,7 +59,7 @@ class FirComponentCallBuilder : FirCallBuilder, FirAnnotationContainerBuilder, F } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildComponentCall(init: FirComponentCallBuilder.() -> Unit): FirComponentCall { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirContinueExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirContinueExpressionBuilder.kt index 92b9afdfaf1..9cb85f10ead 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirContinueExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirContinueExpressionBuilder.kt @@ -48,7 +48,7 @@ class FirContinueExpressionBuilder : FirLoopJumpBuilder, FirAnnotationContainerB } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildContinueExpression(init: FirContinueExpressionBuilder.() -> Unit): FirContinueExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirDelegatedConstructorCallBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirDelegatedConstructorCallBuilder.kt index cb74a6e1a7d..8814644bdd8 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirDelegatedConstructorCallBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirDelegatedConstructorCallBuilder.kt @@ -45,7 +45,7 @@ class FirDelegatedConstructorCallBuilder : FirCallBuilder, FirAnnotationContaine } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildDelegatedConstructorCall(init: FirDelegatedConstructorCallBuilder.() -> Unit): FirDelegatedConstructorCall { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirDoWhileLoopBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirDoWhileLoopBuilder.kt index be3f31f9220..f5560189774 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirDoWhileLoopBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirDoWhileLoopBuilder.kt @@ -43,7 +43,7 @@ class FirDoWhileLoopBuilder : FirLoopBuilder, FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildDoWhileLoop(init: FirDoWhileLoopBuilder.() -> Unit): FirDoWhileLoop { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirElseIfTrueConditionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirElseIfTrueConditionBuilder.kt index 84f2922b23d..d0067dc0070 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirElseIfTrueConditionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirElseIfTrueConditionBuilder.kt @@ -27,7 +27,7 @@ class FirElseIfTrueConditionBuilder : FirAnnotationContainerBuilder { override var source: FirSourceElement? = null override val annotations: MutableList = mutableListOf() - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirExpression { return FirElseIfTrueCondition( source, @@ -37,7 +37,7 @@ class FirElseIfTrueConditionBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildElseIfTrueCondition(init: FirElseIfTrueConditionBuilder.() -> Unit = {}): FirExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirEmptyExpressionBlockBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirEmptyExpressionBlockBuilder.kt index 49bfa0125e9..bfb112fabe3 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirEmptyExpressionBlockBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirEmptyExpressionBlockBuilder.kt @@ -24,7 +24,7 @@ import org.jetbrains.kotlin.fir.visitors.* * DO NOT MODIFY IT MANUALLY */ -@UseExperimental(FirImplementationDetail::class) +@OptIn(FirImplementationDetail::class) fun buildEmptyExpressionBlock(): FirBlock { return FirEmptyExpressionBlock() } diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirErrorExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirErrorExpressionBuilder.kt index b77e8cd548e..1de3b56c2c4 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirErrorExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirErrorExpressionBuilder.kt @@ -47,7 +47,7 @@ class FirErrorExpressionBuilder : FirAnnotationContainerBuilder, FirExpressionBu override val annotations: MutableList = mutableListOf() } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildErrorExpression(init: FirErrorExpressionBuilder.() -> Unit): FirErrorExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirErrorLoopBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirErrorLoopBuilder.kt index bf51ecc9548..9ce09723276 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirErrorLoopBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirErrorLoopBuilder.kt @@ -42,7 +42,7 @@ class FirErrorLoopBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildErrorLoop(init: FirErrorLoopBuilder.() -> Unit): FirErrorLoop { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirExpressionStubBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirExpressionStubBuilder.kt index 5f94f9103d6..5b5979f6d50 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirExpressionStubBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirExpressionStubBuilder.kt @@ -28,7 +28,7 @@ class FirExpressionStubBuilder : FirAnnotationContainerBuilder { var typeRef: FirTypeRef = FirImplicitTypeRefImpl(null) override val annotations: MutableList = mutableListOf() - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirExpression { return FirExpressionStub( source, @@ -39,7 +39,7 @@ class FirExpressionStubBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildExpressionStub(init: FirExpressionStubBuilder.() -> Unit = {}): FirExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirFunctionCallBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirFunctionCallBuilder.kt index 39bc922b23b..a1e8f4a99f8 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirFunctionCallBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirFunctionCallBuilder.kt @@ -43,7 +43,7 @@ open class FirFunctionCallBuilder : FirQualifiedAccessBuilder, FirCallBuilder, F override val arguments: MutableList = mutableListOf() open lateinit var calleeReference: FirNamedReference - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirFunctionCall { return FirFunctionCallImpl( source, @@ -61,7 +61,7 @@ open class FirFunctionCallBuilder : FirQualifiedAccessBuilder, FirCallBuilder, F } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildFunctionCall(init: FirFunctionCallBuilder.() -> Unit): FirFunctionCall { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirGetClassCallBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirGetClassCallBuilder.kt index aec52fd0140..9d13546d04c 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirGetClassCallBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirGetClassCallBuilder.kt @@ -47,7 +47,7 @@ class FirGetClassCallBuilder : FirCallBuilder, FirAnnotationContainerBuilder, Fi } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildGetClassCall(init: FirGetClassCallBuilder.() -> Unit = {}): FirGetClassCall { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirLambdaArgumentExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirLambdaArgumentExpressionBuilder.kt index c2955399bd9..04e034746a6 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirLambdaArgumentExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirLambdaArgumentExpressionBuilder.kt @@ -45,7 +45,7 @@ class FirLambdaArgumentExpressionBuilder : FirAnnotationContainerBuilder, FirExp } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildLambdaArgumentExpression(init: FirLambdaArgumentExpressionBuilder.() -> Unit): FirLambdaArgumentExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirNamedArgumentExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirNamedArgumentExpressionBuilder.kt index e906bdd547f..578d8673a1e 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirNamedArgumentExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirNamedArgumentExpressionBuilder.kt @@ -50,7 +50,7 @@ class FirNamedArgumentExpressionBuilder : FirAnnotationContainerBuilder, FirExpr } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildNamedArgumentExpression(init: FirNamedArgumentExpressionBuilder.() -> Unit): FirNamedArgumentExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirOperatorCallBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirOperatorCallBuilder.kt index de8dc9ab53b..6c3134256db 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirOperatorCallBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirOperatorCallBuilder.kt @@ -51,7 +51,7 @@ class FirOperatorCallBuilder : FirCallBuilder, FirAnnotationContainerBuilder, Fi } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildOperatorCall(init: FirOperatorCallBuilder.() -> Unit): FirOperatorCall { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirQualifiedAccessExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirQualifiedAccessExpressionBuilder.kt index 0352fef72d2..e23d8483c54 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirQualifiedAccessExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirQualifiedAccessExpressionBuilder.kt @@ -56,7 +56,7 @@ class FirQualifiedAccessExpressionBuilder : FirQualifiedAccessBuilder, FirAnnota } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildQualifiedAccessExpression(init: FirQualifiedAccessExpressionBuilder.() -> Unit): FirQualifiedAccessExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirResolvedQualifierBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirResolvedQualifierBuilder.kt index 9cf1c80eac6..33de47fd170 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirResolvedQualifierBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirResolvedQualifierBuilder.kt @@ -52,7 +52,7 @@ class FirResolvedQualifierBuilder : FirAnnotationContainerBuilder, FirExpression } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildResolvedQualifier(init: FirResolvedQualifierBuilder.() -> Unit): FirResolvedQualifier { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirResolvedReifiedParameterReferenceBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirResolvedReifiedParameterReferenceBuilder.kt index 783886d0c30..2ef9e39f3cc 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirResolvedReifiedParameterReferenceBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirResolvedReifiedParameterReferenceBuilder.kt @@ -41,7 +41,7 @@ class FirResolvedReifiedParameterReferenceBuilder : FirAnnotationContainerBuilde } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildResolvedReifiedParameterReference(init: FirResolvedReifiedParameterReferenceBuilder.() -> Unit): FirResolvedReifiedParameterReference { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirReturnExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirReturnExpressionBuilder.kt index 3be984e33fd..eb335c3f3a8 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirReturnExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirReturnExpressionBuilder.kt @@ -50,7 +50,7 @@ class FirReturnExpressionBuilder : FirAnnotationContainerBuilder, FirExpressionB } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildReturnExpression(init: FirReturnExpressionBuilder.() -> Unit): FirReturnExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirSpreadArgumentExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirSpreadArgumentExpressionBuilder.kt index bbef2074eb7..66f72d057d6 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirSpreadArgumentExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirSpreadArgumentExpressionBuilder.kt @@ -45,7 +45,7 @@ class FirSpreadArgumentExpressionBuilder : FirAnnotationContainerBuilder, FirExp } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildSpreadArgumentExpression(init: FirSpreadArgumentExpressionBuilder.() -> Unit): FirSpreadArgumentExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirStringConcatenationCallBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirStringConcatenationCallBuilder.kt index ddd0a0cccef..c91aa6a228e 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirStringConcatenationCallBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirStringConcatenationCallBuilder.kt @@ -47,7 +47,7 @@ class FirStringConcatenationCallBuilder : FirCallBuilder, FirAnnotationContainer } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildStringConcatenationCall(init: FirStringConcatenationCallBuilder.() -> Unit = {}): FirStringConcatenationCall { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirThisReceiverExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirThisReceiverExpressionBuilder.kt index 4937ea8f1f2..d4431ed875f 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirThisReceiverExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirThisReceiverExpressionBuilder.kt @@ -76,7 +76,7 @@ class FirThisReceiverExpressionBuilder : FirQualifiedAccessBuilder, FirAnnotatio } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildThisReceiverExpression(init: FirThisReceiverExpressionBuilder.() -> Unit): FirThisReceiverExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirThrowExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirThrowExpressionBuilder.kt index 83ca49b0bb7..07c94822f79 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirThrowExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirThrowExpressionBuilder.kt @@ -46,7 +46,7 @@ class FirThrowExpressionBuilder : FirAnnotationContainerBuilder, FirExpressionBu } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildThrowExpression(init: FirThrowExpressionBuilder.() -> Unit): FirThrowExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirTryExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirTryExpressionBuilder.kt index b29487c4068..df894f0951e 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirTryExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirTryExpressionBuilder.kt @@ -50,7 +50,7 @@ class FirTryExpressionBuilder : FirAnnotationContainerBuilder, FirExpressionBuil } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildTryExpression(init: FirTryExpressionBuilder.() -> Unit): FirTryExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirTypeOperatorCallBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirTypeOperatorCallBuilder.kt index 3942a5576c9..2ceeca2f881 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirTypeOperatorCallBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirTypeOperatorCallBuilder.kt @@ -52,7 +52,7 @@ class FirTypeOperatorCallBuilder : FirCallBuilder, FirAnnotationContainerBuilder } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildTypeOperatorCall(init: FirTypeOperatorCallBuilder.() -> Unit): FirTypeOperatorCall { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirUnitExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirUnitExpressionBuilder.kt index 2ad314d06e7..7258cb57366 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirUnitExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirUnitExpressionBuilder.kt @@ -27,7 +27,7 @@ class FirUnitExpressionBuilder : FirAnnotationContainerBuilder { override var source: FirSourceElement? = null override val annotations: MutableList = mutableListOf() - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) override fun build(): FirExpression { return FirUnitExpression( source, @@ -37,7 +37,7 @@ class FirUnitExpressionBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildUnitExpression(init: FirUnitExpressionBuilder.() -> Unit = {}): FirExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirVarargArgumentsExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirVarargArgumentsExpressionBuilder.kt index 562742c77d4..09f892e84ed 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirVarargArgumentsExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirVarargArgumentsExpressionBuilder.kt @@ -43,7 +43,7 @@ class FirVarargArgumentsExpressionBuilder : FirAnnotationContainerBuilder, FirEx } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildVarargArgumentsExpression(init: FirVarargArgumentsExpressionBuilder.() -> Unit): FirVarargArgumentsExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirVariableAssignmentBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirVariableAssignmentBuilder.kt index a705d15520b..35d3ae97e69 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirVariableAssignmentBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirVariableAssignmentBuilder.kt @@ -53,7 +53,7 @@ class FirVariableAssignmentBuilder : FirQualifiedAccessBuilder, FirAnnotationCon } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildVariableAssignment(init: FirVariableAssignmentBuilder.() -> Unit): FirVariableAssignment { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhenBranchBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhenBranchBuilder.kt index 7fb378c8357..65b00a1b33d 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhenBranchBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhenBranchBuilder.kt @@ -35,7 +35,7 @@ class FirWhenBranchBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildWhenBranch(init: FirWhenBranchBuilder.() -> Unit): FirWhenBranch { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhenExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhenExpressionBuilder.kt index f20ceddb9e4..3dc45441b35 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhenExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhenExpressionBuilder.kt @@ -53,7 +53,7 @@ class FirWhenExpressionBuilder : FirAnnotationContainerBuilder, FirExpressionBui } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildWhenExpression(init: FirWhenExpressionBuilder.() -> Unit = {}): FirWhenExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhenSubjectExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhenSubjectExpressionBuilder.kt index 407fe5e2c67..3c686fcb190 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhenSubjectExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhenSubjectExpressionBuilder.kt @@ -45,7 +45,7 @@ class FirWhenSubjectExpressionBuilder : FirAnnotationContainerBuilder, FirExpres } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildWhenSubjectExpression(init: FirWhenSubjectExpressionBuilder.() -> Unit): FirWhenSubjectExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhileLoopBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhileLoopBuilder.kt index 8b49cbd6b0f..ee39a8d2f8b 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhileLoopBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWhileLoopBuilder.kt @@ -43,7 +43,7 @@ class FirWhileLoopBuilder : FirLoopBuilder, FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildWhileLoop(init: FirWhileLoopBuilder.() -> Unit): FirWhileLoop { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWrappedDelegateExpressionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWrappedDelegateExpressionBuilder.kt index a5818856872..45bf6a0eb86 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWrappedDelegateExpressionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/builder/FirWrappedDelegateExpressionBuilder.kt @@ -47,7 +47,7 @@ class FirWrappedDelegateExpressionBuilder : FirAnnotationContainerBuilder, FirEx } } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildWrappedDelegateExpression(init: FirWrappedDelegateExpressionBuilder.() -> Unit): FirWrappedDelegateExpression { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/impl/FirComponentCallImpl.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/impl/FirComponentCallImpl.kt index 8f1610f4044..afdd677214f 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/impl/FirComponentCallImpl.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/expressions/impl/FirComponentCallImpl.kt @@ -24,7 +24,7 @@ import org.jetbrains.kotlin.fir.visitors.* * DO NOT MODIFY IT MANUALLY */ -@UseExperimental(FirImplementationDetail::class) +@OptIn(FirImplementationDetail::class) internal class FirComponentCallImpl( override val source: FirSourceElement?, override val annotations: MutableList, diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirBackingFieldReferenceBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirBackingFieldReferenceBuilder.kt index 3cec61d411a..9164ab0b7b0 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirBackingFieldReferenceBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirBackingFieldReferenceBuilder.kt @@ -36,7 +36,7 @@ class FirBackingFieldReferenceBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildBackingFieldReference(init: FirBackingFieldReferenceBuilder.() -> Unit): FirBackingFieldReference { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirDelegateFieldReferenceBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirDelegateFieldReferenceBuilder.kt index 6e67379b06e..540b58bee72 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirDelegateFieldReferenceBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirDelegateFieldReferenceBuilder.kt @@ -36,7 +36,7 @@ class FirDelegateFieldReferenceBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildDelegateFieldReference(init: FirDelegateFieldReferenceBuilder.() -> Unit): FirDelegateFieldReference { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirErrorNamedReferenceBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirErrorNamedReferenceBuilder.kt index 2e4266cd5d8..b5f1b208869 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirErrorNamedReferenceBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirErrorNamedReferenceBuilder.kt @@ -34,7 +34,7 @@ class FirErrorNamedReferenceBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildErrorNamedReference(init: FirErrorNamedReferenceBuilder.() -> Unit): FirErrorNamedReference { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirExplicitSuperReferenceBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirExplicitSuperReferenceBuilder.kt index d11494c03ec..d91b9304908 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirExplicitSuperReferenceBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirExplicitSuperReferenceBuilder.kt @@ -32,7 +32,7 @@ class FirExplicitSuperReferenceBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildExplicitSuperReference(init: FirExplicitSuperReferenceBuilder.() -> Unit): FirSuperReference { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirExplicitThisReferenceBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirExplicitThisReferenceBuilder.kt index b8e510b8406..fc327118c7c 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirExplicitThisReferenceBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirExplicitThisReferenceBuilder.kt @@ -32,7 +32,7 @@ class FirExplicitThisReferenceBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildExplicitThisReference(init: FirExplicitThisReferenceBuilder.() -> Unit = {}): FirThisReference { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirImplicitThisReferenceBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirImplicitThisReferenceBuilder.kt index 59a8e3c1f81..667d4a3d8a7 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirImplicitThisReferenceBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirImplicitThisReferenceBuilder.kt @@ -30,7 +30,7 @@ class FirImplicitThisReferenceBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildImplicitThisReference(init: FirImplicitThisReferenceBuilder.() -> Unit = {}): FirThisReference { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirPropertyFromParameterResolvedNamedReferenceBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirPropertyFromParameterResolvedNamedReferenceBuilder.kt index 2d6dd53a0ff..f66da664d53 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirPropertyFromParameterResolvedNamedReferenceBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirPropertyFromParameterResolvedNamedReferenceBuilder.kt @@ -26,7 +26,7 @@ class FirPropertyFromParameterResolvedNamedReferenceBuilder { lateinit var name: Name lateinit var resolvedSymbol: AbstractFirBasedSymbol<*> - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) fun build(): FirResolvedNamedReference { return FirPropertyFromParameterResolvedNamedReference( source, @@ -37,7 +37,7 @@ class FirPropertyFromParameterResolvedNamedReferenceBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildPropertyFromParameterResolvedNamedReference(init: FirPropertyFromParameterResolvedNamedReferenceBuilder.() -> Unit): FirResolvedNamedReference { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirResolvedCallableReferenceBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirResolvedCallableReferenceBuilder.kt index 45ee2eceb49..1560838117e 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirResolvedCallableReferenceBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirResolvedCallableReferenceBuilder.kt @@ -38,7 +38,7 @@ class FirResolvedCallableReferenceBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildResolvedCallableReference(init: FirResolvedCallableReferenceBuilder.() -> Unit): FirResolvedCallableReference { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirResolvedNamedReferenceBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirResolvedNamedReferenceBuilder.kt index d022d5d823c..9ee2bce17c3 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirResolvedNamedReferenceBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirResolvedNamedReferenceBuilder.kt @@ -35,7 +35,7 @@ class FirResolvedNamedReferenceBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildResolvedNamedReference(init: FirResolvedNamedReferenceBuilder.() -> Unit): FirResolvedNamedReference { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirSimpleNamedReferenceBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirSimpleNamedReferenceBuilder.kt index 4a33f3b4065..0b12ce6d7e4 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirSimpleNamedReferenceBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/references/builder/FirSimpleNamedReferenceBuilder.kt @@ -26,7 +26,7 @@ class FirSimpleNamedReferenceBuilder { lateinit var name: Name var candidateSymbol: AbstractFirBasedSymbol<*>? = null - @UseExperimental(FirImplementationDetail::class) + @OptIn(FirImplementationDetail::class) fun build(): FirNamedReference { return FirSimpleNamedReference( source, @@ -37,7 +37,7 @@ class FirSimpleNamedReferenceBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildSimpleNamedReference(init: FirSimpleNamedReferenceBuilder.() -> Unit): FirNamedReference { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirComposedSuperTypeRefBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirComposedSuperTypeRefBuilder.kt index f6054f34c88..f1490862f28 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirComposedSuperTypeRefBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirComposedSuperTypeRefBuilder.kt @@ -36,7 +36,7 @@ class FirComposedSuperTypeRefBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildComposedSuperTypeRef(init: FirComposedSuperTypeRefBuilder.() -> Unit = {}): FirComposedSuperTypeRef { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirDelegatedTypeRefBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirDelegatedTypeRefBuilder.kt index ef0d40ae0e8..6b8d5861da7 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirDelegatedTypeRefBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirDelegatedTypeRefBuilder.kt @@ -34,7 +34,7 @@ class FirDelegatedTypeRefBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildDelegatedTypeRef(init: FirDelegatedTypeRefBuilder.() -> Unit): FirDelegatedTypeRef { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirDynamicTypeRefBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirDynamicTypeRefBuilder.kt index 409060bf582..4278a9085bb 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirDynamicTypeRefBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirDynamicTypeRefBuilder.kt @@ -35,7 +35,7 @@ class FirDynamicTypeRefBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildDynamicTypeRef(init: FirDynamicTypeRefBuilder.() -> Unit): FirDynamicTypeRef { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirErrorTypeRefBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirErrorTypeRefBuilder.kt index cafbff0cbd3..911b896958d 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirErrorTypeRefBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirErrorTypeRefBuilder.kt @@ -40,7 +40,7 @@ class FirErrorTypeRefBuilder : FirAnnotationContainerBuilder { override val annotations: MutableList = mutableListOf() } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildErrorTypeRef(init: FirErrorTypeRefBuilder.() -> Unit): FirErrorTypeRef { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirFunctionTypeRefBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirFunctionTypeRefBuilder.kt index a2c8a4246b1..e7ed101aa8d 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirFunctionTypeRefBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirFunctionTypeRefBuilder.kt @@ -44,7 +44,7 @@ class FirFunctionTypeRefBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildFunctionTypeRef(init: FirFunctionTypeRefBuilder.() -> Unit): FirFunctionTypeRef { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirImplicitTypeRefBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirImplicitTypeRefBuilder.kt index 1e15504c3a0..9356544baf4 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirImplicitTypeRefBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirImplicitTypeRefBuilder.kt @@ -30,7 +30,7 @@ class FirImplicitTypeRefBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildImplicitTypeRef(init: FirImplicitTypeRefBuilder.() -> Unit = {}): FirImplicitTypeRef { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirResolvedFunctionTypeRefBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirResolvedFunctionTypeRefBuilder.kt index e06159f3eaa..5b8d3f19e9e 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirResolvedFunctionTypeRefBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirResolvedFunctionTypeRefBuilder.kt @@ -46,7 +46,7 @@ class FirResolvedFunctionTypeRefBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildResolvedFunctionTypeRef(init: FirResolvedFunctionTypeRefBuilder.() -> Unit): FirResolvedFunctionTypeRef { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirResolvedTypeRefBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirResolvedTypeRefBuilder.kt index 83b6578706f..3fc23119b4b 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirResolvedTypeRefBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirResolvedTypeRefBuilder.kt @@ -39,7 +39,7 @@ class FirResolvedTypeRefBuilder : FirAnnotationContainerBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildResolvedTypeRef(init: FirResolvedTypeRefBuilder.() -> Unit): FirResolvedTypeRef { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirStarProjectionBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirStarProjectionBuilder.kt index 76fa02ec334..b1d97e48ea5 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirStarProjectionBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirStarProjectionBuilder.kt @@ -29,7 +29,7 @@ class FirStarProjectionBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildStarProjection(init: FirStarProjectionBuilder.() -> Unit = {}): FirStarProjection { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirTypeProjectionWithVarianceBuilder.kt b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirTypeProjectionWithVarianceBuilder.kt index 0a977500892..ae148a5f69f 100644 --- a/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirTypeProjectionWithVarianceBuilder.kt +++ b/compiler/fir/tree/gen/org/jetbrains/kotlin/fir/types/builder/FirTypeProjectionWithVarianceBuilder.kt @@ -35,7 +35,7 @@ class FirTypeProjectionWithVarianceBuilder { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) inline fun buildTypeProjectionWithVariance(init: FirTypeProjectionWithVarianceBuilder.() -> Unit): FirTypeProjectionWithVariance { contract { callsInPlace(init, kotlin.contracts.InvocationKind.EXACTLY_ONCE) diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirDefaultPropertyAccessor.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirDefaultPropertyAccessor.kt index b4e9124abb6..3b0ac83127f 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirDefaultPropertyAccessor.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/declarations/impl/FirDefaultPropertyAccessor.kt @@ -22,7 +22,7 @@ import org.jetbrains.kotlin.fir.types.impl.FirImplicitUnitTypeRef import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.Name -@UseExperimental(FirImplementationDetail::class) +@OptIn(FirImplementationDetail::class) abstract class FirDefaultPropertyAccessor( source: FirSourceElement?, session: FirSession, diff --git a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/printer/builder.kt b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/printer/builder.kt index 97c876890e1..e4389c1d0c3 100644 --- a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/printer/builder.kt +++ b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/printer/builder.kt @@ -64,7 +64,7 @@ private fun SmartPrinter.printBuilder(builder: Builder) { is IntermediateBuilder -> builder.materializedElement!!.typeWithArguments.replace(Regex("<.>"), "<*>") } if (builder is LeafBuilder && builder.implementation.isPublic) { - println("@UseExperimental(FirImplementationDetail::class)") + println("@OptIn(FirImplementationDetail::class)") } if (builder.parents.isNotEmpty()) { print("override ") @@ -226,10 +226,10 @@ private fun SmartPrinter.printDslBuildFunction( ) { val isEmpty = builder.allFields.isEmpty() if (!isEmpty) { - println("@UseExperimental(ExperimentalContracts::class)") + println("@OptIn(ExperimentalContracts::class)") print("inline ") } else if(builder.implementation.isPublic) { - println("@UseExperimental(FirImplementationDetail::class)") + println("@OptIn(FirImplementationDetail::class)") } print("fun ") builder.implementation.element.typeArguments.takeIf { it.isNotEmpty() }?.let { diff --git a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/printer/implementation.kt b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/printer/implementation.kt index 0229ecc37b6..bc365d42ffe 100644 --- a/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/printer/implementation.kt +++ b/compiler/fir/tree/tree-generator/src/org/jetbrains/kotlin/fir/tree/generator/printer/implementation.kt @@ -46,7 +46,7 @@ fun SmartPrinter.printImplementation(implementation: Implementation) { with(implementation) { if (requiresOptIn) { - println("@UseExperimental(FirImplementationDetail::class)") + println("@OptIn(FirImplementationDetail::class)") } if (!isPublic) { print("internal ") diff --git a/compiler/frontend/src/org/jetbrains/kotlin/config/KotlinTypeRefinerImpl.kt b/compiler/frontend/src/org/jetbrains/kotlin/config/KotlinTypeRefinerImpl.kt index 52b347c649c..13cc6bb9393 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/config/KotlinTypeRefinerImpl.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/config/KotlinTypeRefinerImpl.kt @@ -21,7 +21,7 @@ import org.jetbrains.kotlin.types.replace import org.jetbrains.kotlin.utils.DFS import org.jetbrains.kotlin.utils.addToStdlib.safeAs -@UseExperimental(TypeRefinement::class) +@OptIn(TypeRefinement::class) class KotlinTypeRefinerImpl( private val moduleDescriptor: ModuleDescriptor, storageManager: StorageManager diff --git a/compiler/frontend/src/org/jetbrains/kotlin/extensions/internal/CandidateInterceptor.kt b/compiler/frontend/src/org/jetbrains/kotlin/extensions/internal/CandidateInterceptor.kt index a6c737565be..00acaa14832 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/extensions/internal/CandidateInterceptor.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/extensions/internal/CandidateInterceptor.kt @@ -20,7 +20,7 @@ import org.jetbrains.kotlin.resolve.calls.tower.ImplicitScopeTower import org.jetbrains.kotlin.resolve.calls.tower.NewResolutionOldInference import org.jetbrains.kotlin.resolve.scopes.ResolutionScope -@UseExperimental(InternalNonStableExtensionPoints::class) +@OptIn(InternalNonStableExtensionPoints::class) class CandidateInterceptor(project: Project) { private val extensions = getInstances(project) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/extensions/internal/NonStableExtensionPoints.kt b/compiler/frontend/src/org/jetbrains/kotlin/extensions/internal/NonStableExtensionPoints.kt index 742137c9c68..81231351025 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/extensions/internal/NonStableExtensionPoints.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/extensions/internal/NonStableExtensionPoints.kt @@ -23,12 +23,13 @@ import org.jetbrains.kotlin.resolve.scopes.ResolutionScope import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.expressions.ExpressionTypingContext - /** * This is marker for non-stable experimental extension points. * Extension points marked with this meta-annotation will be broken in the future version. * Please do not use them in general code. */ +@RequiresOptIn(level = RequiresOptIn.Level.ERROR) +@Suppress("DEPRECATION") @Experimental(level = Experimental.Level.ERROR) @Retention(AnnotationRetention.BINARY) internal annotation class InternalNonStableExtensionPoints diff --git a/compiler/frontend/src/org/jetbrains/kotlin/extensions/internal/TypeResolutionInterceptor.kt b/compiler/frontend/src/org/jetbrains/kotlin/extensions/internal/TypeResolutionInterceptor.kt index 5e53bdc483a..899861c0548 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/extensions/internal/TypeResolutionInterceptor.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/extensions/internal/TypeResolutionInterceptor.kt @@ -13,7 +13,7 @@ import org.jetbrains.kotlin.psi.KtLambdaExpression import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.types.expressions.ExpressionTypingContext -@UseExperimental(InternalNonStableExtensionPoints::class) +@OptIn(InternalNonStableExtensionPoints::class) class TypeResolutionInterceptor(project: Project) { private val extensions = getInstances(project) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/OverrideResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/OverrideResolver.kt index 30b4984a777..01240c4e112 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/OverrideResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/OverrideResolver.kt @@ -918,7 +918,7 @@ class OverrideResolver( declaringClass: ClassDescriptor, kotlinTypeRefiner: KotlinTypeRefiner ): CallableMemberDescriptor? { - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) for (supertype in kotlinTypeRefiner.refineSupertypes(declaringClass)) { val all = linkedSetOf() all.addAll(supertype.memberScope.getContributedFunctions(declared.name, NoLookupLocation.WHEN_CHECK_OVERRIDES)) 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 1933848c217..978448f76f1 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallExpressionResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/CallExpressionResolver.kt @@ -378,7 +378,7 @@ class CallExpressionResolver( val selector = element.selector - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) var selectorTypeInfo = getUnsafeSelectorTypeInfo(receiver, callOperationNode, selector, context, initialDataFlowInfoForArguments) .run { diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/KotlinResolutionCallbacksImpl.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/KotlinResolutionCallbacksImpl.kt index 157e76235f9..6bde43de217 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/KotlinResolutionCallbacksImpl.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tower/KotlinResolutionCallbacksImpl.kt @@ -151,7 +151,7 @@ class KotlinResolutionCallbacksImpl( // Also note that refining the whole type might be undesired because sometimes it contains NO_EXPECTED_TYPE // which throws exceptions on attempt to call equals val refinedReceiverType = receiverType?.let { - @UseExperimental(TypeRefinement::class) callComponents.kotlinTypeChecker.kotlinTypeRefiner.refineType(it) + @OptIn(TypeRefinement::class) callComponents.kotlinTypeChecker.kotlinTypeRefiner.refineType(it) } val expectedType = createFunctionType( diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyClassMemberScope.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyClassMemberScope.kt index 1047dc5400c..8c2e1ef5fea 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyClassMemberScope.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/descriptors/LazyClassMemberScope.kt @@ -100,7 +100,7 @@ open class LazyClassMemberScope( } val supertypes by storageManager.createLazyValue { - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) kotlinTypeRefiner.refineSupertypes(thisDescriptor) } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.kt b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.kt index b6619c4e534..43f8a13f3a5 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/DoubleColonExpressionResolver.kt @@ -83,7 +83,7 @@ private fun KotlinTypeRefiner.refineBareType(type: PossiblyBareType): PossiblyBa return PossiblyBareType.type(newType) } -@UseExperimental(TypeRefinement::class) +@OptIn(TypeRefinement::class) private fun KotlinTypeRefiner.refineLHS(lhs: T): T = when (lhs) { is DoubleColonLHS.Expression -> { val newType = lhs.typeInfo.type?.let { refineType(it) } @@ -373,7 +373,7 @@ class DoubleColonExpressionResolver( val resultForType = tryResolveLHS(doubleColonExpression, c, this::shouldTryResolveLHSAsType) { expression, context -> resolveTypeOnLHS(expression, doubleColonExpression, context)?.let { // If lhs is not expression then ExpressionTypingVisitor don't refine it's type and we should do this manually - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) DoubleColonLHS.Type(kotlinTypeRefiner.refineType(it.type), kotlinTypeRefiner.refineBareType(it.possiblyBareType)) } } diff --git a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/CityHash.kt b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/CityHash.kt index 9ef25e1984e..ae150d32a4c 100644 --- a/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/CityHash.kt +++ b/compiler/ir/serialization.common/src/org/jetbrains/kotlin/backend/common/serialization/CityHash.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. */ -@file:UseExperimental(ExperimentalUnsignedTypes::class) +@file:OptIn(ExperimentalUnsignedTypes::class) package org.jetbrains.kotlin.backend.common.serialization diff --git a/compiler/psi/src/org/jetbrains/kotlin/psi/psiUtil/psiUtils.kt b/compiler/psi/src/org/jetbrains/kotlin/psi/psiUtil/psiUtils.kt index 2f90b4bfb3a..d9fa4142d85 100644 --- a/compiler/psi/src/org/jetbrains/kotlin/psi/psiUtil/psiUtils.kt +++ b/compiler/psi/src/org/jetbrains/kotlin/psi/psiUtil/psiUtils.kt @@ -484,7 +484,7 @@ fun LazyParseablePsiElement.getContainingKtFile(): KtFile { throw IllegalStateException("KtElement not inside KtFile: $file with text \"$fileString\" for element $this of type ${this::class.java} node = ${this.node}") } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) fun KtExpression.isNull(): Boolean { contract { returns(true) implies (this@isNull is KtConstantExpression) diff --git a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintInjector.kt b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintInjector.kt index 1e1f4c5a44d..4c151839570 100644 --- a/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintInjector.kt +++ b/compiler/resolution/src/org/jetbrains/kotlin/resolve/calls/inference/components/ConstraintInjector.kt @@ -139,7 +139,7 @@ class ConstraintInjector( return baseContext.prepareType(type) } - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) override fun refineType(type: KotlinTypeMarker): KotlinTypeMarker { return if (type is KotlinType) { kotlinTypeRefiner.refineType(type) diff --git a/compiler/testData/codegen/box/inference/kt35684.kt b/compiler/testData/codegen/box/inference/kt35684.kt index a8c96ba733e..849bfea5dd1 100644 --- a/compiler/testData/codegen/box/inference/kt35684.kt +++ b/compiler/testData/codegen/box/inference/kt35684.kt @@ -13,7 +13,7 @@ fun test() { } } -@UseExperimental(ExperimentalTypeInference::class) +@OptIn(ExperimentalTypeInference::class) fun sequence(@BuilderInference block: suspend Inv.() -> Unit) {} interface Inv { @@ -22,4 +22,4 @@ interface Inv { fun materialize(): Inv = TODO() -fun box(): String = "OK" \ No newline at end of file +fun box(): String = "OK" diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.kt index 04e3715546e..1689588bf12 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.kt @@ -1,3 +1,4 @@ +// !USE_EXPERIMENTAL: kotlin.RequiresOptIn // !LANGUAGE: +NewInference import kotlin.experimental.ExperimentalTypeInference @@ -10,7 +11,7 @@ class InImpl : In { override fun send(element: E) {} } -@UseExperimental(ExperimentalTypeInference::class) +@OptIn(ExperimentalTypeInference::class) public fun builder(@BuilderInference block: In.() -> Unit) { InImpl().block() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.txt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.txt index afd49498b41..34d7b36dfe2 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.txt @@ -1,6 +1,6 @@ package -@kotlin.UseExperimental(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun builder(/*0*/ @kotlin.BuilderInference block: In.() -> kotlin.Unit): kotlin.Unit +@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun builder(/*0*/ @kotlin.BuilderInference block: In.() -> kotlin.Unit): kotlin.Unit public fun test(): kotlin.Unit public suspend fun yield(): kotlin.Unit diff --git a/compiler/tests/org/jetbrains/kotlin/daemon/experimental/integration/CompilerDaemonTest.kt b/compiler/tests/org/jetbrains/kotlin/daemon/experimental/integration/CompilerDaemonTest.kt index 4700adf0779..f115fd0881c 100644 --- a/compiler/tests/org/jetbrains/kotlin/daemon/experimental/integration/CompilerDaemonTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/daemon/experimental/integration/CompilerDaemonTest.kt @@ -778,7 +778,7 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() { private val PARALLEL_THREADS_TO_COMPILE = 10 private val PARALLEL_WAIT_TIMEOUT_S = 60L - @UseExperimental(ObsoleteCoroutinesApi::class) + @OptIn(ObsoleteCoroutinesApi::class) private fun runCompile( daemon: CompileServiceAsync, resultCodes: Array, @@ -878,7 +878,7 @@ class CompilerDaemonTest : KotlinIntegrationTestBase() { const val connectionFailedErr = -100 } - @UseExperimental(ObsoleteCoroutinesApi::class) + @OptIn(ObsoleteCoroutinesApi::class) fun ignore_testParallelDaemonStart() { val doneLatch = CountDownLatch(ParallelStartParams.threads) diff --git a/compiler/tests/org/jetbrains/kotlin/daemon/experimental/unit/ConnectionsTest.kt b/compiler/tests/org/jetbrains/kotlin/daemon/experimental/unit/ConnectionsTest.kt index 1b18d581bf1..80a39fd1579 100644 --- a/compiler/tests/org/jetbrains/kotlin/daemon/experimental/unit/ConnectionsTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/daemon/experimental/unit/ConnectionsTest.kt @@ -352,7 +352,7 @@ class ConnectionsTest : KotlinIntegrationTestBase() { val servicesClient = services.clientSide val compResultsClient = kotlinCompilerClient.createCompResults().clientSide val threadCount = 10 - @UseExperimental(ObsoleteCoroutinesApi::class) + @OptIn(ObsoleteCoroutinesApi::class) fun runThread(i: Int) = async(newSingleThreadContext("thread_$i")) { val jar = tmpdir.absolutePath + File.separator + "hello.$i.jar" diff --git a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassMemberScope.kt b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassMemberScope.kt index ef4a0c65db9..9ded0329f0d 100644 --- a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassMemberScope.kt +++ b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaClassMemberScope.kt @@ -563,7 +563,7 @@ class LazyJavaClassMemberScope( private fun computeSupertypes(): Collection { if (skipRefinement) return ownerDescriptor.typeConstructor.supertypes - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) return c.components.kotlinTypeChecker.kotlinTypeRefiner.refineSupertypes(ownerDescriptor) } diff --git a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/types/RawType.kt b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/types/RawType.kt index 490afefac26..fd181f20209 100644 --- a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/types/RawType.kt +++ b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/java/lazy/types/RawType.kt @@ -91,7 +91,7 @@ class RawTypeImpl private constructor(lowerBound: SimpleType, upperBound: Simple } @TypeRefinement - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): FlexibleType { return RawTypeImpl( kotlinTypeRefiner.refineType(lowerBound) as SimpleType, @@ -160,7 +160,7 @@ internal object RawSubstitution : TypeSubstitution() { type.isMarkedNullable, memberScope ) factory@{ kotlinTypeRefiner -> val classId = (declaration as? ClassDescriptor)?.classId ?: return@factory null - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) val refinedClassDescriptor = kotlinTypeRefiner.findClassAcrossModuleDependencies(classId) ?: return@factory null if (refinedClassDescriptor == declaration) return@factory null diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/ScopesHolderForClass.kt b/core/descriptors/src/org/jetbrains/kotlin/descriptors/ScopesHolderForClass.kt index c6b31d25355..f476346ecc2 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/ScopesHolderForClass.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/ScopesHolderForClass.kt @@ -22,7 +22,7 @@ class ScopesHolderForClass private constructor( scopeFactory(kotlinTypeRefinerForOwnerModule) } - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) fun getScope(kotlinTypeRefiner: KotlinTypeRefiner): T { /* * That check doesn't break anything, because scopeForOwnerModule _will_ anyway refine supertypes from module of diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/AbstractTypeAliasDescriptor.kt b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/AbstractTypeAliasDescriptor.kt index 69ee9878b10..ff9c0cde8fc 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/AbstractTypeAliasDescriptor.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/AbstractTypeAliasDescriptor.kt @@ -92,7 +92,7 @@ abstract class AbstractTypeAliasDescriptor( protected abstract fun getTypeConstructorTypeParameters(): List - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) protected fun computeDefaultType(): SimpleType = TypeUtils.makeUnsubstitutedType(this, classDescriptor?.unsubstitutedMemberScope ?: MemberScope.Empty) { kotlinTypeRefiner -> kotlinTypeRefiner.refineDescriptor(this)?.defaultType @@ -121,7 +121,7 @@ abstract class AbstractTypeAliasDescriptor( // There must be @TypeRefinement, but there is a bug with anonymous objects and experimental annotations // See KT-31728 - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): TypeConstructor = this } } diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/ModuleDescriptorImpl.kt b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/ModuleDescriptorImpl.kt index 3155e0fe142..accb16a0486 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/ModuleDescriptorImpl.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/ModuleDescriptorImpl.kt @@ -47,7 +47,7 @@ class ModuleDescriptorImpl @JvmOverloads constructor( throw IllegalArgumentException("Module name must be special: $moduleName") } this.capabilities = capabilities.toMutableMap() - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) this.capabilities[REFINER_CAPABILITY] = Ref(null) } diff --git a/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt b/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt index a643dc997a5..2900cc38c89 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/resolve/DescriptorUtils.kt @@ -450,5 +450,5 @@ fun DeclarationDescriptor.isPrimaryConstructorOfInlineClass(): Boolean = @TypeRefinement fun ModuleDescriptor.getKotlinTypeRefiner(): KotlinTypeRefiner = getCapability(REFINER_CAPABILITY)?.value ?: KotlinTypeRefiner.Default -@UseExperimental(TypeRefinement::class) +@OptIn(TypeRefinement::class) fun ModuleDescriptor.isTypeRefinementEnabled(): Boolean = getCapability(REFINER_CAPABILITY)?.value != null diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/AbstractTypeConstructor.kt b/core/descriptors/src/org/jetbrains/kotlin/types/AbstractTypeConstructor.kt index b0425c938f3..963885c6e6c 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/AbstractTypeConstructor.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/AbstractTypeConstructor.kt @@ -45,7 +45,7 @@ abstract class AbstractTypeConstructor(storageManager: StorageManager) : TypeCon result in deadlock */ private val refinedSupertypes by lazy(LazyThreadSafetyMode.PUBLICATION) { - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) kotlinTypeRefiner.refineTypes(this@AbstractTypeConstructor.getSupertypes()) } diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/IntersectionTypeConstructor.kt b/core/descriptors/src/org/jetbrains/kotlin/types/IntersectionTypeConstructor.kt index a80a40ab20b..1d2f62f4e2d 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/IntersectionTypeConstructor.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/IntersectionTypeConstructor.kt @@ -72,7 +72,7 @@ class IntersectionTypeConstructor(typesToIntersect: Collection) : Ty return intersectedTypes == other.intersectedTypes } - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) fun createType(): SimpleType = KotlinTypeFactory.simpleTypeWithNonTrivialMemberScope( Annotations.EMPTY, this, listOf(), false, this.createScopeForKotlinType() diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/KotlinTypeFactory.kt b/core/descriptors/src/org/jetbrains/kotlin/types/KotlinTypeFactory.kt index bd3fb390b2e..7e4b4622eb0 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/KotlinTypeFactory.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/KotlinTypeFactory.kt @@ -35,7 +35,7 @@ typealias RefinedTypeFactory = (KotlinTypeRefiner) -> SimpleType? object KotlinTypeFactory { val EMPTY_REFINED_TYPE_FACTORY: RefinedTypeFactory = { _ -> null } - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) private fun computeMemberScope( constructor: TypeConstructor, arguments: List, @@ -62,7 +62,7 @@ object KotlinTypeFactory { @JvmStatic @JvmOverloads - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) fun simpleType( annotations: Annotations, constructor: TypeConstructor, @@ -112,7 +112,7 @@ object KotlinTypeFactory { private class ExpandedTypeOrRefinedConstructor(val expandedType: SimpleType?, val refinedConstructor: TypeConstructor?) @JvmStatic - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) fun simpleTypeWithNonTrivialMemberScope( annotations: Annotations, constructor: TypeConstructor, diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/SpecialTypes.kt b/core/descriptors/src/org/jetbrains/kotlin/types/SpecialTypes.kt index 2b6281fe12a..7720071e26a 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/SpecialTypes.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/SpecialTypes.kt @@ -58,7 +58,7 @@ class AbbreviatedType(override val delegate: SimpleType, val abbreviation: Simpl override fun replaceDelegate(delegate: SimpleType) = AbbreviatedType(delegate, abbreviation) @TypeRefinement - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): AbbreviatedType = AbbreviatedType( kotlinTypeRefiner.refineType(delegate) as SimpleType, @@ -85,7 +85,7 @@ class LazyWrappedType( override fun isComputed(): Boolean = lazyValue.isComputed() @TypeRefinement - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) override fun refine(kotlinTypeRefiner: KotlinTypeRefiner) = LazyWrappedType(storageManager) { kotlinTypeRefiner.refineType(computation()) } diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/TypeWithEnhancement.kt b/core/descriptors/src/org/jetbrains/kotlin/types/TypeWithEnhancement.kt index e6729c60264..236de1041a2 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/TypeWithEnhancement.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/TypeWithEnhancement.kt @@ -45,7 +45,7 @@ class SimpleTypeWithEnhancement( override fun replaceDelegate(delegate: SimpleType) = SimpleTypeWithEnhancement(delegate, enhancement) @TypeRefinement - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): SimpleTypeWithEnhancement = SimpleTypeWithEnhancement( kotlinTypeRefiner.refineType(delegate) as SimpleType, @@ -75,7 +75,7 @@ class FlexibleTypeWithEnhancement( override val delegate: SimpleType get() = origin.delegate @TypeRefinement - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) override fun refine(kotlinTypeRefiner: KotlinTypeRefiner) = FlexibleTypeWithEnhancement( kotlinTypeRefiner.refineType(origin) as FlexibleType, diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/checker/ClassicTypeCheckerContext.kt b/core/descriptors/src/org/jetbrains/kotlin/types/checker/ClassicTypeCheckerContext.kt index 2f9c48c9a43..9aaf1f2160f 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/checker/ClassicTypeCheckerContext.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/checker/ClassicTypeCheckerContext.kt @@ -35,7 +35,7 @@ open class ClassicTypeCheckerContext( return NewKotlinTypeChecker.Default.transformToNewType(type.unwrap()) } - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) override fun refineType(type: KotlinTypeMarker): KotlinTypeMarker { require(type is KotlinType, type::errorMessage) return kotlinTypeRefiner.refineType(type) diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/checker/ClassicTypeSystemContext.kt b/core/descriptors/src/org/jetbrains/kotlin/types/checker/ClassicTypeSystemContext.kt index 538c9663ba6..4c97bca2d91 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/checker/ClassicTypeSystemContext.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/checker/ClassicTypeSystemContext.kt @@ -685,7 +685,7 @@ fun Variance.convertVariance(): TypeVariance { } -@UseExperimental(ExperimentalContracts::class) +@OptIn(ExperimentalContracts::class) fun requireOrDescribe(condition: Boolean, value: Any?) { contract { returns() implies condition diff --git a/core/descriptors/src/org/jetbrains/kotlin/types/flexibleTypes.kt b/core/descriptors/src/org/jetbrains/kotlin/types/flexibleTypes.kt index 358cdf9fcc2..eb4e0d1937b 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/types/flexibleTypes.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/types/flexibleTypes.kt @@ -138,7 +138,7 @@ class FlexibleTypeImpl(lowerBound: SimpleType, upperBound: SimpleType) : Flexibl = KotlinTypeFactory.flexibleType(lowerBound.makeNullableAsSpecified(newNullability), upperBound.makeNullableAsSpecified(newNullability)) @TypeRefinement - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) override fun refine(kotlinTypeRefiner: KotlinTypeRefiner): FlexibleType { return FlexibleTypeImpl( kotlinTypeRefiner.refineType(lowerBound) as SimpleType, diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt index acf9b659887..8ba55196805 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedClassDescriptor.kt @@ -227,7 +227,7 @@ class DeserializedClassDescriptor( } private val refinedSupertypes = c.storageManager.createLazyValue { - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) kotlinTypeRefiner.refineSupertypes(classDescriptor) } diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/RemovePartsFromPropertyFix.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/RemovePartsFromPropertyFix.kt index 06d77c5264a..f61db9a790c 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/RemovePartsFromPropertyFix.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/RemovePartsFromPropertyFix.kt @@ -81,7 +81,7 @@ open class RemovePartsFromPropertyFix( // The ideal fix would be using a String that needs to be rendered instead of actual type // // But calling another type refinement also helps because it makes KotlinType instance using new module descriptor - @UseExperimental(TypeRefinement::class) + @OptIn(TypeRefinement::class) typeToAdd = replaceElement.getResolutionFacade().frontendService().refineType(typeToAdd) SpecifyTypeExplicitlyIntention.addTypeAnnotation(editor, replaceElement, typeToAdd) diff --git a/libraries/stdlib/coroutines-experimental/src/kotlin/coroutines/experimental/SequenceBuilder.kt b/libraries/stdlib/coroutines-experimental/src/kotlin/coroutines/experimental/SequenceBuilder.kt index a49e845ed62..495e6137aec 100644 --- a/libraries/stdlib/coroutines-experimental/src/kotlin/coroutines/experimental/SequenceBuilder.kt +++ b/libraries/stdlib/coroutines-experimental/src/kotlin/coroutines/experimental/SequenceBuilder.kt @@ -5,7 +5,7 @@ @file:kotlin.jvm.JvmMultifileClass @file:kotlin.jvm.JvmName("SequenceBuilderKt") -@file:UseExperimental(ExperimentalTypeInference::class) +@file:OptIn(ExperimentalTypeInference::class) package kotlin.coroutines.experimental diff --git a/libraries/stdlib/jdk8/test/time/DurationConversionTest.kt b/libraries/stdlib/jdk8/test/time/DurationConversionTest.kt index 9cbb31bd3be..b7964f878ec 100644 --- a/libraries/stdlib/jdk8/test/time/DurationConversionTest.kt +++ b/libraries/stdlib/jdk8/test/time/DurationConversionTest.kt @@ -3,8 +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. */ -@file:UseExperimental(ExperimentalTime::class) - +@file:OptIn(ExperimentalTime::class) package kotlin.jdk8.time.test import kotlin.random.Random diff --git a/libraries/stdlib/js/src/kotlin/collections/ArraysJs.kt b/libraries/stdlib/js/src/kotlin/collections/ArraysJs.kt index 8e7f2bb347d..82472e736be 100644 --- a/libraries/stdlib/js/src/kotlin/collections/ArraysJs.kt +++ b/libraries/stdlib/js/src/kotlin/collections/ArraysJs.kt @@ -6,7 +6,7 @@ package kotlin.collections -@UseExperimental(ExperimentalUnsignedTypes::class) +@OptIn(ExperimentalUnsignedTypes::class) @SinceKotlin("1.3") @kotlin.js.JsName("contentDeepHashCodeImpl") internal fun Array.contentDeepHashCodeImpl(): Int { diff --git a/libraries/stdlib/js/src/kotlin/text/StringBuilderJs.kt b/libraries/stdlib/js/src/kotlin/text/StringBuilderJs.kt index 29e0675d26f..91c6559804b 100644 --- a/libraries/stdlib/js/src/kotlin/text/StringBuilderJs.kt +++ b/libraries/stdlib/js/src/kotlin/text/StringBuilderJs.kt @@ -46,7 +46,7 @@ public actual class StringBuilder actual constructor(content: String) : Appendab return this } - @UseExperimental(ExperimentalStdlibApi::class) + @OptIn(ExperimentalStdlibApi::class) actual override fun append(value: CharSequence?, startIndex: Int, endIndex: Int): StringBuilder = this.appendRange(value, startIndex, endIndex) /** diff --git a/libraries/stdlib/js/src/kotlin/text/utf8Encoding.kt b/libraries/stdlib/js/src/kotlin/text/utf8Encoding.kt index 64badc8fcea..51eb944458b 100644 --- a/libraries/stdlib/js/src/kotlin/text/utf8Encoding.kt +++ b/libraries/stdlib/js/src/kotlin/text/utf8Encoding.kt @@ -6,7 +6,7 @@ package kotlin.text /** Returns the negative [size] if [throwOnMalformed] is false, throws [CharacterCodingException] otherwise. */ -@UseExperimental(ExperimentalStdlibApi::class) +@OptIn(ExperimentalStdlibApi::class) private fun malformed(size: Int, index: Int, throwOnMalformed: Boolean): Int { if (throwOnMalformed) throw CharacterCodingException("Malformed sequence starting at ${index - 1}") return -size diff --git a/libraries/stdlib/src/kotlin/collections/Arrays.kt b/libraries/stdlib/src/kotlin/collections/Arrays.kt index 65cc9233f3b..af5b48ddf43 100644 --- a/libraries/stdlib/src/kotlin/collections/Arrays.kt +++ b/libraries/stdlib/src/kotlin/collections/Arrays.kt @@ -67,7 +67,7 @@ public inline fun C.ifEmpty(defaultValue: () -> R): R where C : Array<*>, if (isEmpty()) defaultValue() else this -@UseExperimental(ExperimentalUnsignedTypes::class) +@OptIn(ExperimentalUnsignedTypes::class) @SinceKotlin("1.3") @PublishedApi @kotlin.jvm.JvmName("contentDeepEquals") @@ -120,7 +120,7 @@ internal fun Array.contentDeepToStringImpl(): String { } } -@UseExperimental(ExperimentalUnsignedTypes::class) +@OptIn(ExperimentalUnsignedTypes::class) private fun Array.contentDeepToStringInternal(result: StringBuilder, processed: MutableList>) { if (this in processed) { result.append("[...]") diff --git a/libraries/stdlib/src/kotlin/collections/Collections.kt b/libraries/stdlib/src/kotlin/collections/Collections.kt index 18c476af78f..7635efb05ce 100644 --- a/libraries/stdlib/src/kotlin/collections/Collections.kt +++ b/libraries/stdlib/src/kotlin/collections/Collections.kt @@ -5,7 +5,7 @@ @file:kotlin.jvm.JvmMultifileClass @file:kotlin.jvm.JvmName("CollectionsKt") -@file:UseExperimental(kotlin.experimental.ExperimentalTypeInference::class) +@file:OptIn(kotlin.experimental.ExperimentalTypeInference::class) package kotlin.collections diff --git a/libraries/stdlib/src/kotlin/collections/Maps.kt b/libraries/stdlib/src/kotlin/collections/Maps.kt index b7e2daff563..b06abb183bd 100644 --- a/libraries/stdlib/src/kotlin/collections/Maps.kt +++ b/libraries/stdlib/src/kotlin/collections/Maps.kt @@ -5,7 +5,7 @@ @file:kotlin.jvm.JvmMultifileClass @file:kotlin.jvm.JvmName("MapsKt") -@file:UseExperimental(kotlin.experimental.ExperimentalTypeInference::class) +@file:OptIn(kotlin.experimental.ExperimentalTypeInference::class) package kotlin.collections diff --git a/libraries/stdlib/src/kotlin/collections/SequenceBuilder.kt b/libraries/stdlib/src/kotlin/collections/SequenceBuilder.kt index 49483e706a3..ba6d7150015 100644 --- a/libraries/stdlib/src/kotlin/collections/SequenceBuilder.kt +++ b/libraries/stdlib/src/kotlin/collections/SequenceBuilder.kt @@ -5,7 +5,7 @@ @file:kotlin.jvm.JvmMultifileClass @file:kotlin.jvm.JvmName("SequencesKt") -@file:UseExperimental(ExperimentalTypeInference::class) +@file:OptIn(ExperimentalTypeInference::class) package kotlin.sequences diff --git a/libraries/stdlib/src/kotlin/collections/Sets.kt b/libraries/stdlib/src/kotlin/collections/Sets.kt index d655110b931..eab0e097b48 100644 --- a/libraries/stdlib/src/kotlin/collections/Sets.kt +++ b/libraries/stdlib/src/kotlin/collections/Sets.kt @@ -5,7 +5,7 @@ @file:kotlin.jvm.JvmMultifileClass @file:kotlin.jvm.JvmName("SetsKt") -@file:UseExperimental(kotlin.experimental.ExperimentalTypeInference::class) +@file:OptIn(kotlin.experimental.ExperimentalTypeInference::class) package kotlin.collections diff --git a/libraries/stdlib/src/kotlin/random/Random.kt b/libraries/stdlib/src/kotlin/random/Random.kt index 4c23111cfcd..8b0014e1c77 100644 --- a/libraries/stdlib/src/kotlin/random/Random.kt +++ b/libraries/stdlib/src/kotlin/random/Random.kt @@ -338,7 +338,7 @@ public fun Random.nextLong(range: LongRange): Long = when { internal expect fun defaultPlatformRandom(): Random internal expect fun doubleFromParts(hi26: Int, low27: Int): Double -@UseExperimental(ExperimentalStdlibApi::class) +@OptIn(ExperimentalStdlibApi::class) internal fun fastLog2(value: Int): Int = 31 - value.countLeadingZeroBits() /** Takes upper [bitCount] bits (0..32) from this number. */ diff --git a/libraries/stdlib/src/kotlin/text/Strings.kt b/libraries/stdlib/src/kotlin/text/Strings.kt index 1851a953a4e..fbdc097e20c 100644 --- a/libraries/stdlib/src/kotlin/text/Strings.kt +++ b/libraries/stdlib/src/kotlin/text/Strings.kt @@ -438,7 +438,7 @@ public fun String.substringAfterLast(delimiter: String, missingDelimiterValue: S * @param startIndex the index of the first character to be replaced. * @param endIndex the index of the first character after the replacement to keep in the string. */ -@UseExperimental(ExperimentalStdlibApi::class) +@OptIn(ExperimentalStdlibApi::class) public fun CharSequence.replaceRange(startIndex: Int, endIndex: Int, replacement: CharSequence): CharSequence { if (endIndex < startIndex) throw IndexOutOfBoundsException("End index ($endIndex) is less than start index ($startIndex).") @@ -484,7 +484,7 @@ public inline fun String.replaceRange(range: IntRange, replacement: CharSequence * * [endIndex] is not included in the removed part. */ -@UseExperimental(ExperimentalStdlibApi::class) +@OptIn(ExperimentalStdlibApi::class) public fun CharSequence.removeRange(startIndex: Int, endIndex: Int): CharSequence { if (endIndex < startIndex) throw IndexOutOfBoundsException("End index ($endIndex) is less than start index ($startIndex).") diff --git a/libraries/stdlib/src/kotlin/time/Duration.kt b/libraries/stdlib/src/kotlin/time/Duration.kt index 0c39d62c36c..517c1a8c623 100644 --- a/libraries/stdlib/src/kotlin/time/Duration.kt +++ b/libraries/stdlib/src/kotlin/time/Duration.kt @@ -7,7 +7,7 @@ package kotlin.time import kotlin.math.abs -@UseExperimental(ExperimentalTime::class) +@OptIn(ExperimentalTime::class) private inline val storageUnit get() = DurationUnit.NANOSECONDS /** @@ -302,7 +302,7 @@ public inline class Duration internal constructor(internal val value: Double) : * * @sample samples.time.Durations.toIsoString */ - @UseExperimental(ExperimentalStdlibApi::class) + @OptIn(ExperimentalStdlibApi::class) public fun toIsoString(): String = buildString { if (isNegative()) append('-') append("PT") diff --git a/libraries/stdlib/test/time/DurationTest.kt b/libraries/stdlib/test/time/DurationTest.kt index b510d29bab2..4c423a31c07 100644 --- a/libraries/stdlib/test/time/DurationTest.kt +++ b/libraries/stdlib/test/time/DurationTest.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. */ -@file:UseExperimental(ExperimentalTime::class) +@file:OptIn(ExperimentalTime::class) package test.time import test.numbers.assertAlmostEquals @@ -398,4 +398,4 @@ class DurationTest { test(Duration.INFINITE, "Infinity") } -} \ No newline at end of file +} diff --git a/libraries/stdlib/test/time/DurationUnitTest.kt b/libraries/stdlib/test/time/DurationUnitTest.kt index b4d36ea6ced..63373e05088 100644 --- a/libraries/stdlib/test/time/DurationUnitTest.kt +++ b/libraries/stdlib/test/time/DurationUnitTest.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. */ -@file:UseExperimental(ExperimentalTime::class) +@file:OptIn(ExperimentalTime::class) package test.time import kotlin.test.* @@ -44,4 +44,4 @@ class DurationUnitTest { -} \ No newline at end of file +} diff --git a/libraries/stdlib/test/time/MeasureTimeTest.kt b/libraries/stdlib/test/time/MeasureTimeTest.kt index 53494baf76e..9d2d8cf5645 100644 --- a/libraries/stdlib/test/time/MeasureTimeTest.kt +++ b/libraries/stdlib/test/time/MeasureTimeTest.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. */ -@file:UseExperimental(ExperimentalTime::class) +@file:OptIn(ExperimentalTime::class) package test.time import kotlin.random.Random @@ -68,4 +68,4 @@ class MeasureTimeTest { assertEquals(expectedResult, result) assertEquals(result.nanoseconds, elapsed2) } -} \ No newline at end of file +} diff --git a/libraries/stdlib/test/time/TestTimeSourceTest.kt b/libraries/stdlib/test/time/TestTimeSourceTest.kt index de7e81625e5..e8ba18ce685 100644 --- a/libraries/stdlib/test/time/TestTimeSourceTest.kt +++ b/libraries/stdlib/test/time/TestTimeSourceTest.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. */ -@file:UseExperimental(ExperimentalTime::class) +@file:OptIn(ExperimentalTime::class) package test.time import kotlin.test.* @@ -59,4 +59,4 @@ class TestTimeSourceTest { timeSource += 1.9.nanoseconds assertEquals(1.nanoseconds, mark.elapsedNow()) } -} \ No newline at end of file +} diff --git a/libraries/stdlib/test/time/TimeMarkTest.kt b/libraries/stdlib/test/time/TimeMarkTest.kt index 8c8c900ac31..982b9dcac3a 100644 --- a/libraries/stdlib/test/time/TimeMarkTest.kt +++ b/libraries/stdlib/test/time/TimeMarkTest.kt @@ -2,7 +2,8 @@ * 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. */ -@file:UseExperimental(ExperimentalTime::class) + +@file:OptIn(ExperimentalTime::class) package test.time import kotlin.test.* @@ -50,4 +51,4 @@ class TimeMarkTest { markPast1.assertHasPassed(true) } -} \ No newline at end of file +} diff --git a/libraries/stdlib/unsigned/src/kotlin/UProgressionUtil.kt b/libraries/stdlib/unsigned/src/kotlin/UProgressionUtil.kt index 499010f9a66..8bde1762906 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UProgressionUtil.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UProgressionUtil.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. */ -@file:UseExperimental(ExperimentalUnsignedTypes::class) +@file:OptIn(ExperimentalUnsignedTypes::class) package kotlin.internal // (a - b) mod c diff --git a/libraries/stdlib/unsigned/src/kotlin/UnsignedUtils.kt b/libraries/stdlib/unsigned/src/kotlin/UnsignedUtils.kt index c47efcdba50..b9411b0dc63 100644 --- a/libraries/stdlib/unsigned/src/kotlin/UnsignedUtils.kt +++ b/libraries/stdlib/unsigned/src/kotlin/UnsignedUtils.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. */ @file:kotlin.jvm.JvmName("UnsignedKt") -@file:UseExperimental(ExperimentalUnsignedTypes::class) +@file:OptIn(ExperimentalUnsignedTypes::class) package kotlin @PublishedApi diff --git a/libraries/tools/kotlinp/src/org/jetbrains/kotlin/kotlinp/printers.kt b/libraries/tools/kotlinp/src/org/jetbrains/kotlin/kotlinp/printers.kt index e4444537a13..9714475d648 100644 --- a/libraries/tools/kotlinp/src/org/jetbrains/kotlin/kotlinp/printers.kt +++ b/libraries/tools/kotlinp/src/org/jetbrains/kotlin/kotlinp/printers.kt @@ -444,7 +444,7 @@ private fun renderAnnotation(annotation: KmAnnotation): String = "$name = ${renderAnnotationArgument(argument)}" } -@UseExperimental(ExperimentalUnsignedTypes::class) +@OptIn(ExperimentalUnsignedTypes::class) private fun renderAnnotationArgument(arg: KmAnnotationArgument<*>): String = when (arg) { is KmAnnotationArgument.ByteValue -> arg.value.toString() + ".toByte()" diff --git a/libraries/tools/kotlinp/testData/Contracts.kt b/libraries/tools/kotlinp/testData/Contracts.kt index 74514449556..9e2377e566d 100644 --- a/libraries/tools/kotlinp/testData/Contracts.kt +++ b/libraries/tools/kotlinp/testData/Contracts.kt @@ -1,4 +1,4 @@ -@file:UseExperimental(ExperimentalContracts::class) +@file:OptIn(ExperimentalContracts::class) import kotlin.contracts.InvocationKind import kotlin.contracts.contract