diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.kt index 62e27409e88..9220211d5af 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/complexPostponedCfg.kt @@ -7,7 +7,7 @@ interface FirFunctionCall : FirBase fun foo(statements: List, arguments: List, explicitReceiver: FirBase): List { val firstCalls = with(statements.last() as FirFunctionCall) setCall@{ - buildList { + buildList { add(this@setCall) with(arguments.last() as FirFunctionCall) plusCall@{ add(this@plusCall) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInference.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInference.kt index c9da07e28f1..36d5a357534 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInference.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInference.kt @@ -1,4 +1,4 @@ -fun foo(@BuilderInference block: MutableList.() -> Unit): T = null!! +fun foo(@BuilderInference block: MutableList.() -> Unit): T = null!! fun takeString(s: String) {} diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceAndCoercionToUnit.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceAndCoercionToUnit.kt index 8e42372635c..7e53c3593be 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceAndCoercionToUnit.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceAndCoercionToUnit.kt @@ -2,7 +2,7 @@ class DropDownComponent(val initialValues: List) fun test(strings: List) { val dropDown = DropDownComponent( - initialValues = buildList { + initialValues = buildList { addAll(strings) } ) diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceFromStdlib.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceFromStdlib.kt index 8f52040311f..4a04bfca0b4 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceFromStdlib.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/inference/builderInferenceFromStdlib.kt @@ -1,5 +1,5 @@ fun test_1() { - val list = buildList { + val list = buildList { add("") } takeList(list) @@ -12,7 +12,7 @@ fun test_2() { takeList(list) } -fun myBuildList(@BuilderInference builderAction: MutableList.() -> Unit): List { +fun myBuildList(@BuilderInference builderAction: MutableList.() -> Unit): List { return ArrayList().apply(builderAction) } diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/KtFirCompositeScope.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/KtFirCompositeScope.kt index fcde33b65d6..8957b783f92 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/KtFirCompositeScope.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/KtFirCompositeScope.kt @@ -2,7 +2,7 @@ interface KtScope { fun getAllNames(): Set } -inline fun buildSet(@BuilderInference builderAction: MutableSet.() -> Unit): Set { +inline fun buildSet(@BuilderInference builderAction: MutableSet.() -> Unit): Set { return null!! } diff --git a/compiler/fir/checkers/checkers-component-generator/src/org/jetbrains/kotlin/fir/checkers/generator/diagnostics/FirDiagnosticsList.kt b/compiler/fir/checkers/checkers-component-generator/src/org/jetbrains/kotlin/fir/checkers/generator/diagnostics/FirDiagnosticsList.kt index 00035535dca..e4316dbf143 100644 --- a/compiler/fir/checkers/checkers-component-generator/src/org/jetbrains/kotlin/fir/checkers/generator/diagnostics/FirDiagnosticsList.kt +++ b/compiler/fir/checkers/checkers-component-generator/src/org/jetbrains/kotlin/fir/checkers/generator/diagnostics/FirDiagnosticsList.kt @@ -271,34 +271,34 @@ object DIAGNOSTICS_LIST : DiagnosticList("FirErrors") { val REPEATED_ANNOTATION_WARNING by warning() } - val EXPERIMENTAL by object : DiagnosticGroup("OptIn-related") { - val EXPERIMENTAL_API_USAGE by warning(PositioningStrategy.REFERENCE_BY_QUALIFIED) { + val OPT_IN by object : DiagnosticGroup("OptIn") { + val OPT_IN_USAGE by warning(PositioningStrategy.REFERENCE_BY_QUALIFIED) { parameter("optInMarkerFqName") parameter("message") } - val EXPERIMENTAL_API_USAGE_ERROR by warning(PositioningStrategy.REFERENCE_BY_QUALIFIED) { + val OPT_IN_USAGE_ERROR by warning(PositioningStrategy.REFERENCE_BY_QUALIFIED) { parameter("optInMarkerFqName") parameter("message") } - val EXPERIMENTAL_OVERRIDE by warning { + val OPT_IN_OVERRIDE by warning { parameter("optInMarkerFqName") parameter("message") } - val EXPERIMENTAL_OVERRIDE_ERROR by error { + val OPT_IN_OVERRIDE_ERROR by error { parameter("optInMarkerFqName") parameter("message") } - val EXPERIMENTAL_IS_NOT_ENABLED by warning(PositioningStrategy.REFERENCED_NAME_BY_QUALIFIED) - val EXPERIMENTAL_CAN_ONLY_BE_USED_AS_ANNOTATION by error() - val EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_USE_EXPERIMENTAL by error() - val USE_EXPERIMENTAL_WITHOUT_ARGUMENTS by warning() - val USE_EXPERIMENTAL_ARGUMENT_IS_NOT_MARKER by warning { + val OPT_IN_IS_NOT_ENABLED by warning(PositioningStrategy.REFERENCED_NAME_BY_QUALIFIED) + val OPT_IN_CAN_ONLY_BE_USED_AS_ANNOTATION by error() + val OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN by error() + val OPT_IN_WITHOUT_ARGUMENTS by warning() + val OPT_IN_ARGUMENT_IS_NOT_MARKER by warning { parameter("notMarkerFqName") } - val EXPERIMENTAL_ANNOTATION_WITH_WRONG_TARGET by error { + val OPT_IN_MARKER_WITH_WRONG_TARGET by error { parameter("target") } - val EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION by error() + val OPT_IN_MARKER_WITH_WRONG_RETENTION by error() } val EXPOSED_VISIBILITY by object : DiagnosticGroup("Exposed visibility") { diff --git a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt index f91f018db98..edeb2acd912 100644 --- a/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt +++ b/compiler/fir/checkers/gen/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt @@ -237,18 +237,18 @@ object FirErrors { val REPEATED_ANNOTATION by error0() val REPEATED_ANNOTATION_WARNING by warning0() - // OptIn-related - val EXPERIMENTAL_API_USAGE by warning2(SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED) - val EXPERIMENTAL_API_USAGE_ERROR by warning2(SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED) - val EXPERIMENTAL_OVERRIDE by warning2() - val EXPERIMENTAL_OVERRIDE_ERROR by error2() - val EXPERIMENTAL_IS_NOT_ENABLED by warning0(SourceElementPositioningStrategies.REFERENCED_NAME_BY_QUALIFIED) - val EXPERIMENTAL_CAN_ONLY_BE_USED_AS_ANNOTATION by error0() - val EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_USE_EXPERIMENTAL by error0() - val USE_EXPERIMENTAL_WITHOUT_ARGUMENTS by warning0() - val USE_EXPERIMENTAL_ARGUMENT_IS_NOT_MARKER by warning1() - val EXPERIMENTAL_ANNOTATION_WITH_WRONG_TARGET by error1() - val EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION by error0() + // OptIn + val OPT_IN_USAGE by warning2(SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED) + val OPT_IN_USAGE_ERROR by warning2(SourceElementPositioningStrategies.REFERENCE_BY_QUALIFIED) + val OPT_IN_OVERRIDE by warning2() + val OPT_IN_OVERRIDE_ERROR by error2() + val OPT_IN_IS_NOT_ENABLED by warning0(SourceElementPositioningStrategies.REFERENCED_NAME_BY_QUALIFIED) + val OPT_IN_CAN_ONLY_BE_USED_AS_ANNOTATION by error0() + val OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN by error0() + val OPT_IN_WITHOUT_ARGUMENTS by warning0() + val OPT_IN_ARGUMENT_IS_NOT_MARKER by warning1() + val OPT_IN_MARKER_WITH_WRONG_TARGET by error1() + val OPT_IN_MARKER_WITH_WRONG_RETENTION by error0() // Exposed visibility val EXPOSED_TYPEALIAS_EXPANDED_TYPE by error3, EffectiveVisibility>(SourceElementPositioningStrategies.DECLARATION_NAME) diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirOptInAnnotationClassChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirOptInAnnotationClassChecker.kt index acc32826557..f0402749ee2 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirOptInAnnotationClassChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/declaration/FirOptInAnnotationClassChecker.kt @@ -23,7 +23,7 @@ object FirOptInAnnotationClassChecker : FirRegularClassChecker() { if (declaration.getAnnotationByClassId(OptInNames.REQUIRES_OPT_IN_CLASS_ID) == null) return if (declaration.getRetention() == AnnotationRetention.SOURCE) { val target = declaration.getRetentionAnnotation() - reporter.reportOn(target?.source, FirErrors.EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION, context) + reporter.reportOn(target?.source, FirErrors.OPT_IN_MARKER_WITH_WRONG_RETENTION, context) } val wrongTargets = declaration.getAllowedAnnotationTargets().intersect(Experimentality.WRONG_TARGETS_FOR_MARKER) @@ -31,7 +31,7 @@ object FirOptInAnnotationClassChecker : FirRegularClassChecker() { val target = declaration.getTargetAnnotation() reporter.reportOn( target?.source, - FirErrors.EXPERIMENTAL_ANNOTATION_WITH_WRONG_TARGET, + FirErrors.OPT_IN_MARKER_WITH_WRONG_TARGET, wrongTargets.joinToString(transform = KotlinTarget::description), context ) diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirClassLiteralChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirClassLiteralChecker.kt index 19a92f8595b..2c7204b8591 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirClassLiteralChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirClassLiteralChecker.kt @@ -33,7 +33,7 @@ object FirClassLiteralChecker : FirGetClassCallChecker() { if (argument is FirResolvedQualifier) { val classId = argument.classId if (classId == OptInNames.REQUIRES_OPT_IN_CLASS_ID || classId == OptInNames.OPT_IN_CLASS_ID) { - reporter.reportOn(argument.source, FirErrors.EXPERIMENTAL_CAN_ONLY_BE_USED_AS_ANNOTATION, context) + reporter.reportOn(argument.source, FirErrors.OPT_IN_CAN_ONLY_BE_USED_AS_ANNOTATION, context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInAnnotationCallChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInAnnotationCallChecker.kt index aa7bc278312..84596363871 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInAnnotationCallChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInAnnotationCallChecker.kt @@ -31,7 +31,7 @@ object FirOptInAnnotationCallChecker : FirAnnotationCallChecker() { if (isOptIn) { val arguments = expression.arguments if (arguments.isEmpty()) { - reporter.reportOn(expression.source, FirErrors.USE_EXPERIMENTAL_WITHOUT_ARGUMENTS, context) + reporter.reportOn(expression.source, FirErrors.OPT_IN_WITHOUT_ARGUMENTS, context) } else { val annotationClasses = expression.findArgumentByName(OptInNames.USE_EXPERIMENTAL_ANNOTATION_CLASS) for (classSymbol in annotationClasses?.extractClassesFromArgument().orEmpty()) { @@ -39,7 +39,7 @@ object FirOptInAnnotationCallChecker : FirAnnotationCallChecker() { if (classSymbol.loadExperimentalityForMarkerAnnotation() == null) { reporter.reportOn( expression.source, - FirErrors.USE_EXPERIMENTAL_ARGUMENT_IS_NOT_MARKER, + FirErrors.OPT_IN_ARGUMENT_IS_NOT_MARKER, classSymbol.classId.asSingleFqName(), context ) @@ -61,7 +61,7 @@ object FirOptInAnnotationCallChecker : FirAnnotationCallChecker() { if (!languageVersionSettings.supportsFeature(LanguageFeature.OptInRelease) && OptInNames.REQUIRES_OPT_IN_FQ_NAME.asString() !in useExperimentalFqNames ) { - reporter.reportOn(element, FirErrors.EXPERIMENTAL_IS_NOT_ENABLED, context) + reporter.reportOn(element, FirErrors.OPT_IN_IS_NOT_ENABLED, context) } } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.kt index fe1156dda5e..835566ab615 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/expression/FirOptInUsageBaseChecker.kt @@ -191,8 +191,8 @@ object FirOptInUsageBaseChecker { for ((annotationClassId, severity, message) in experimentalities) { if (!isExperimentalityAcceptableInContext(annotationClassId, context)) { val diagnostic = when (severity) { - Experimentality.Severity.WARNING -> FirErrors.EXPERIMENTAL_API_USAGE - Experimentality.Severity.ERROR -> FirErrors.EXPERIMENTAL_API_USAGE_ERROR + Experimentality.Severity.WARNING -> FirErrors.OPT_IN_USAGE + Experimentality.Severity.ERROR -> FirErrors.OPT_IN_USAGE_ERROR } val reportedMessage = message ?: when (severity) { Experimentality.Severity.WARNING -> "This declaration is experimental and its usage should be marked" diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/type/FirOptInUsageTypeRefChecker.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/type/FirOptInUsageTypeRefChecker.kt index 1bad4cd71be..866882db0a5 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/type/FirOptInUsageTypeRefChecker.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/checkers/type/FirOptInUsageTypeRefChecker.kt @@ -9,8 +9,8 @@ import org.jetbrains.kotlin.fir.FirRealSourceElementKind import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirOptInUsageBaseChecker import org.jetbrains.kotlin.fir.analysis.diagnostics.DiagnosticReporter -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPERIMENTAL_CAN_ONLY_BE_USED_AS_ANNOTATION -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_USE_EXPERIMENTAL +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_CAN_ONLY_BE_USED_AS_ANNOTATION +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN import org.jetbrains.kotlin.fir.analysis.diagnostics.reportOn import org.jetbrains.kotlin.fir.declarations.FirResolvePhase import org.jetbrains.kotlin.fir.declarations.getAnnotationByClassId @@ -36,9 +36,9 @@ object FirOptInUsageTypeRefChecker : FirTypeRefChecker() { val lastAnnotationCall = context.qualifiedAccessOrAnnotationCalls.lastOrNull() as? FirAnnotationCall if (lastAnnotationCall == null || lastAnnotationCall.annotationTypeRef !== typeRef) { if (classId == OptInNames.REQUIRES_OPT_IN_CLASS_ID || classId == OptInNames.OPT_IN_CLASS_ID) { - reporter.reportOn(source, EXPERIMENTAL_CAN_ONLY_BE_USED_AS_ANNOTATION, context) + reporter.reportOn(source, OPT_IN_CAN_ONLY_BE_USED_AS_ANNOTATION, context) } else if (symbol is FirRegularClassSymbol && symbol.fir.getAnnotationByClassId(OptInNames.REQUIRES_OPT_IN_CLASS_ID) != null) { - reporter.reportOn(source, EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_USE_EXPERIMENTAL, context) + reporter.reportOn(source, OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN, context) } } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDefaultErrorMessages.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDefaultErrorMessages.kt index 0492d566bd2..0bb78af2d37 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDefaultErrorMessages.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirDefaultErrorMessages.kt @@ -163,15 +163,15 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPECTED_FUNCTION import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPECTED_LATEINIT_PROPERTY import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPECTED_PRIVATE_DECLARATION import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPECTED_PROPERTY_INITIALIZER -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPERIMENTAL_ANNOTATION_WITH_WRONG_TARGET -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPERIMENTAL_API_USAGE -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPERIMENTAL_API_USAGE_ERROR -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPERIMENTAL_CAN_ONLY_BE_USED_AS_ANNOTATION -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPERIMENTAL_IS_NOT_ENABLED -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_USE_EXPERIMENTAL -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPERIMENTAL_OVERRIDE -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPERIMENTAL_OVERRIDE_ERROR +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_MARKER_WITH_WRONG_RETENTION +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_MARKER_WITH_WRONG_TARGET +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_USAGE +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_USAGE_ERROR +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_CAN_ONLY_BE_USED_AS_ANNOTATION +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_IS_NOT_ENABLED +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_OVERRIDE +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_OVERRIDE_ERROR import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPLICIT_DELEGATION_CALL_REQUIRED import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_FUNCTION_RETURN_TYPE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.EXPOSED_PARAMETER_TYPE @@ -456,8 +456,8 @@ import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.USELESS_ELVIS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.USELESS_ELVIS_RIGHT_IS_NULL import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.USELESS_IS_CHECK import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.USELESS_VARARG_ON_PARAMETER -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.USE_EXPERIMENTAL_ARGUMENT_IS_NOT_MARKER -import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.USE_EXPERIMENTAL_WITHOUT_ARGUMENTS +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_ARGUMENT_IS_NOT_MARKER +import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.OPT_IN_WITHOUT_ARGUMENTS import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VALUE_CLASS_CANNOT_BE_CLONEABLE import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VALUE_PARAMETER_WITH_NO_TYPE_ANNOTATION import org.jetbrains.kotlin.fir.analysis.diagnostics.FirErrors.VAL_OR_VAR_ON_CATCH_PARAMETER @@ -699,31 +699,31 @@ class FirDefaultErrorMessages { map.put(REPEATED_ANNOTATION_WARNING, "This annotation is not repeatable") // OptIn - map.put(EXPERIMENTAL_API_USAGE, "{1}", TO_STRING, STRING) - map.put(EXPERIMENTAL_API_USAGE_ERROR, "{1}", TO_STRING, STRING) + map.put(OPT_IN_USAGE, "{1}", TO_STRING, STRING) + map.put(OPT_IN_USAGE_ERROR, "{1}", TO_STRING, STRING) - map.put(EXPERIMENTAL_OVERRIDE, "{1}", TO_STRING, STRING) - map.put(EXPERIMENTAL_OVERRIDE_ERROR, "{1}", TO_STRING, STRING) + map.put(OPT_IN_OVERRIDE, "{1}", TO_STRING, STRING) + map.put(OPT_IN_OVERRIDE_ERROR, "{1}", TO_STRING, STRING) - map.put(EXPERIMENTAL_IS_NOT_ENABLED, "This class can only be used with the compiler argument '-opt-in=kotlin.RequiresOptIn'") - map.put(EXPERIMENTAL_CAN_ONLY_BE_USED_AS_ANNOTATION, "This class can only be used as an annotation") + map.put(OPT_IN_IS_NOT_ENABLED, "This class can only be used with the compiler argument '-opt-in=kotlin.RequiresOptIn'") + map.put(OPT_IN_CAN_ONLY_BE_USED_AS_ANNOTATION, "This class can only be used as an annotation") map.put( - EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_USE_EXPERIMENTAL, + OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN, "This class can only be used as an annotation or as an argument to @OptIn" ) - map.put(USE_EXPERIMENTAL_WITHOUT_ARGUMENTS, "@OptIn without any arguments has no effect") + map.put(OPT_IN_WITHOUT_ARGUMENTS, "@OptIn without any arguments has no effect") map.put( - USE_EXPERIMENTAL_ARGUMENT_IS_NOT_MARKER, + OPT_IN_ARGUMENT_IS_NOT_MARKER, "Annotation ''{0}'' is not an opt-in requirement marker, therefore its usage in @OptIn is ignored", TO_STRING ) map.put( - EXPERIMENTAL_ANNOTATION_WITH_WRONG_TARGET, + OPT_IN_MARKER_WITH_WRONG_TARGET, "Opt-in requirement marker annotation cannot be used on the following code elements: {0}. Please remove these targets", STRING ) map.put( - EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION, + OPT_IN_MARKER_WITH_WRONG_RETENTION, "Opt-in requirement marker annotation cannot be used with SOURCE retention. Please replace retention with BINARY" ) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/Errors.java b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/Errors.java index fa644c1c86b..c24265d768d 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/Errors.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/Errors.java @@ -277,26 +277,26 @@ public interface Errors { DiagnosticFactory1 ILLEGAL_KOTLIN_VERSION_STRING_VALUE = DiagnosticFactory1.create(ERROR); DiagnosticFactory1 NEWER_VERSION_IN_SINCE_KOTLIN = DiagnosticFactory1.create(WARNING); - DiagnosticFactory2 EXPERIMENTAL_API_USAGE = DiagnosticFactory2.create(WARNING); - DiagnosticFactory2 EXPERIMENTAL_API_USAGE_ERROR = DiagnosticFactory2.create(ERROR); - DiagnosticFactory2 EXPERIMENTAL_API_USAGE_FUTURE_ERROR = DiagnosticFactory2.create(WARNING); + DiagnosticFactory2 OPT_IN_USAGE = DiagnosticFactory2.create(WARNING); + DiagnosticFactory2 OPT_IN_USAGE_ERROR = DiagnosticFactory2.create(ERROR); + DiagnosticFactory2 OPT_IN_USAGE_FUTURE_ERROR = DiagnosticFactory2.create(WARNING); - DiagnosticFactory2 EXPERIMENTAL_OVERRIDE = DiagnosticFactory2.create(WARNING); - DiagnosticFactory2 EXPERIMENTAL_OVERRIDE_ERROR = DiagnosticFactory2.create(ERROR); + DiagnosticFactory2 OPT_IN_OVERRIDE = DiagnosticFactory2.create(WARNING); + DiagnosticFactory2 OPT_IN_OVERRIDE_ERROR = DiagnosticFactory2.create(ERROR); - DiagnosticFactory0 EXPERIMENTAL_IS_NOT_ENABLED = DiagnosticFactory0.create(WARNING); - DiagnosticFactory0 EXPERIMENTAL_CAN_ONLY_BE_USED_AS_ANNOTATION = DiagnosticFactory0.create(ERROR); + DiagnosticFactory0 OPT_IN_IS_NOT_ENABLED = DiagnosticFactory0.create(WARNING); + DiagnosticFactory0 OPT_IN_CAN_ONLY_BE_USED_AS_ANNOTATION = DiagnosticFactory0.create(ERROR); DiagnosticFactory0 - EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_USE_EXPERIMENTAL = DiagnosticFactory0.create(ERROR); + OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN = DiagnosticFactory0.create(ERROR); - DiagnosticFactory0 USE_EXPERIMENTAL_WITHOUT_ARGUMENTS = DiagnosticFactory0.create(WARNING); - DiagnosticFactory1 USE_EXPERIMENTAL_ARGUMENT_IS_NOT_MARKER = DiagnosticFactory1.create(WARNING); - DiagnosticFactory1 EXPERIMENTAL_ANNOTATION_WITH_WRONG_TARGET = DiagnosticFactory1.create(ERROR); - DiagnosticFactory0 EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION = DiagnosticFactory0.create(ERROR); + DiagnosticFactory0 OPT_IN_WITHOUT_ARGUMENTS = DiagnosticFactory0.create(WARNING); + DiagnosticFactory1 OPT_IN_ARGUMENT_IS_NOT_MARKER = DiagnosticFactory1.create(WARNING); + DiagnosticFactory1 OPT_IN_MARKER_WITH_WRONG_TARGET = DiagnosticFactory1.create(ERROR); + DiagnosticFactory0 OPT_IN_MARKER_WITH_WRONG_RETENTION = DiagnosticFactory0.create(ERROR); - DiagnosticFactory1 EXPERIMENTAL_ANNOTATION_ON_WRONG_TARGET = DiagnosticFactory1.create(ERROR); - DiagnosticFactory0 EXPERIMENTAL_ANNOTATION_ON_OVERRIDE = DiagnosticFactory0.create(ERROR); - DiagnosticFactory0 EXPERIMENTAL_ANNOTATION_ON_OVERRIDE_WARNING = DiagnosticFactory0.create(WARNING); + DiagnosticFactory1 OPT_IN_MARKER_ON_WRONG_TARGET = DiagnosticFactory1.create(ERROR); + DiagnosticFactory0 OPT_IN_MARKER_ON_OVERRIDE = DiagnosticFactory0.create(ERROR); + DiagnosticFactory0 OPT_IN_MARKER_ON_OVERRIDE_WARNING = DiagnosticFactory0.create(WARNING); DiagnosticFactory1 EXPERIMENTAL_UNSIGNED_LITERALS = DiagnosticFactory1.create(WARNING); DiagnosticFactory1 EXPERIMENTAL_UNSIGNED_LITERALS_ERROR = DiagnosticFactory1.create(ERROR); diff --git a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java index 837a9791d7f..8af252ce3d3 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java @@ -158,25 +158,25 @@ public class DefaultErrorMessages { MAP.put(ILLEGAL_KOTLIN_VERSION_STRING_VALUE, "Invalid @{0} annotation value (should be ''major.minor'' or ''major.minor.patch'')", TO_STRING); MAP.put(NEWER_VERSION_IN_SINCE_KOTLIN, "The version is greater than the specified API version {0}", STRING); - MAP.put(EXPERIMENTAL_API_USAGE, "{1}", TO_STRING, STRING); - MAP.put(EXPERIMENTAL_API_USAGE_ERROR, "{1}", TO_STRING, STRING); - MAP.put(EXPERIMENTAL_API_USAGE_FUTURE_ERROR, "{1}", TO_STRING, STRING); + MAP.put(OPT_IN_USAGE, "{1}", TO_STRING, STRING); + MAP.put(OPT_IN_USAGE_ERROR, "{1}", TO_STRING, STRING); + MAP.put(OPT_IN_USAGE_FUTURE_ERROR, "{1}", TO_STRING, STRING); - MAP.put(EXPERIMENTAL_OVERRIDE, "{1}", TO_STRING, STRING); - MAP.put(EXPERIMENTAL_OVERRIDE_ERROR, "{1}", TO_STRING, STRING); + MAP.put(OPT_IN_OVERRIDE, "{1}", TO_STRING, STRING); + MAP.put(OPT_IN_OVERRIDE_ERROR, "{1}", TO_STRING, STRING); - MAP.put(EXPERIMENTAL_IS_NOT_ENABLED, "This class can only be used with the compiler argument '-Xopt-in=kotlin.RequiresOptIn'"); - MAP.put(EXPERIMENTAL_CAN_ONLY_BE_USED_AS_ANNOTATION, "This class can only be used as an annotation"); - MAP.put(EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_USE_EXPERIMENTAL, "This class can only be used as an annotation or as an argument to @OptIn"); + MAP.put(OPT_IN_IS_NOT_ENABLED, "This class can only be used with the compiler argument '-Xopt-in=kotlin.RequiresOptIn'"); + MAP.put(OPT_IN_CAN_ONLY_BE_USED_AS_ANNOTATION, "This class can only be used as an annotation"); + MAP.put(OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN, "This class can only be used as an annotation or as an argument to @OptIn"); - MAP.put(USE_EXPERIMENTAL_WITHOUT_ARGUMENTS, "@OptIn without any arguments has no effect"); - MAP.put(USE_EXPERIMENTAL_ARGUMENT_IS_NOT_MARKER, "Annotation ''{0}'' is not an opt-in requirement marker, therefore its usage in @OptIn is ignored", TO_STRING); - MAP.put(EXPERIMENTAL_ANNOTATION_WITH_WRONG_TARGET, "Opt-in requirement marker annotation cannot be used on the following code elements: {0}. Please remove these targets", STRING); - MAP.put(EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION, "Opt-in requirement marker annotation cannot be used with SOURCE retention. Please replace retention with BINARY"); + MAP.put(OPT_IN_WITHOUT_ARGUMENTS, "@OptIn without any arguments has no effect"); + MAP.put(OPT_IN_ARGUMENT_IS_NOT_MARKER, "Annotation ''{0}'' is not an opt-in requirement marker, therefore its usage in @OptIn is ignored", TO_STRING); + MAP.put(OPT_IN_MARKER_WITH_WRONG_TARGET, "Opt-in requirement marker annotation cannot be used on the following code elements: {0}. Please remove these targets", STRING); + MAP.put(OPT_IN_MARKER_WITH_WRONG_RETENTION, "Opt-in requirement marker annotation cannot be used with SOURCE retention. Please replace retention with BINARY"); - MAP.put(EXPERIMENTAL_ANNOTATION_ON_WRONG_TARGET, "Opt-in requirement marker annotation cannot be used on {0}", STRING); - MAP.put(EXPERIMENTAL_ANNOTATION_ON_OVERRIDE, "Opt-in requirement marker annotation on override requires the same marker on base declaration"); - MAP.put(EXPERIMENTAL_ANNOTATION_ON_OVERRIDE_WARNING, "Opt-in requirement marker annotation on override makes no sense without the same marker on base declaration"); + MAP.put(OPT_IN_MARKER_ON_WRONG_TARGET, "Opt-in requirement marker annotation cannot be used on {0}", STRING); + MAP.put(OPT_IN_MARKER_ON_OVERRIDE, "Opt-in requirement marker annotation on override requires the same marker on base declaration"); + MAP.put(OPT_IN_MARKER_ON_OVERRIDE_WARNING, "Opt-in requirement marker annotation on override makes no sense without the same marker on base declaration"); MAP.put(EXPERIMENTAL_UNSIGNED_LITERALS, "{0}", STRING); MAP.put(EXPERIMENTAL_UNSIGNED_LITERALS_ERROR, "{0}", STRING); diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExperimentalMarkerDeclarationAnnotationChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExperimentalMarkerDeclarationAnnotationChecker.kt index f72893a665b..f6f930a2e5c 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExperimentalMarkerDeclarationAnnotationChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExperimentalMarkerDeclarationAnnotationChecker.kt @@ -65,22 +65,22 @@ class ExperimentalMarkerDeclarationAnnotationChecker(private val module: ModuleD if (PROPERTY_GETTER in possibleTargets || annotationUseSiteTarget == AnnotationUseSiteTarget.PROPERTY_GETTER ) { - trace.report(Errors.EXPERIMENTAL_ANNOTATION_ON_WRONG_TARGET.on(entry, "getter")) + trace.report(Errors.OPT_IN_MARKER_ON_WRONG_TARGET.on(entry, "getter")) } if (VALUE_PARAMETER in possibleTargets && annotationUseSiteTarget == null || annotationUseSiteTarget == AnnotationUseSiteTarget.RECEIVER || annotationUseSiteTarget == AnnotationUseSiteTarget.SETTER_PARAMETER || annotationUseSiteTarget == AnnotationUseSiteTarget.CONSTRUCTOR_PARAMETER ) { - trace.report(Errors.EXPERIMENTAL_ANNOTATION_ON_WRONG_TARGET.on(entry, "parameter")) + trace.report(Errors.OPT_IN_MARKER_ON_WRONG_TARGET.on(entry, "parameter")) } if (LOCAL_VARIABLE in possibleTargets) { - trace.report(Errors.EXPERIMENTAL_ANNOTATION_ON_WRONG_TARGET.on(entry, "variable")) + trace.report(Errors.OPT_IN_MARKER_ON_WRONG_TARGET.on(entry, "variable")) } if (annotationUseSiteTarget == AnnotationUseSiteTarget.FIELD || annotationUseSiteTarget == AnnotationUseSiteTarget.PROPERTY_DELEGATE_FIELD ) { - trace.report(Errors.EXPERIMENTAL_ANNOTATION_ON_WRONG_TARGET.on(entry, "field")) + trace.report(Errors.OPT_IN_MARKER_ON_WRONG_TARGET.on(entry, "field")) } if (annotated is KtCallableDeclaration && annotated !is KtPropertyAccessor && @@ -92,9 +92,9 @@ class ExperimentalMarkerDeclarationAnnotationChecker(private val module: ModuleD !descriptor.hasExperimentalOverriddenDescriptors(annotationClass.fqNameSafe) ) { if (languageVersionSettings.supportsFeature(LanguageFeature.OptInOnOverrideForbidden)) { - trace.report(Errors.EXPERIMENTAL_ANNOTATION_ON_OVERRIDE.on(entry)) + trace.report(Errors.OPT_IN_MARKER_ON_OVERRIDE.on(entry)) } else { - trace.report(Errors.EXPERIMENTAL_ANNOTATION_ON_OVERRIDE_WARNING.on(entry)) + trace.report(Errors.OPT_IN_MARKER_ON_OVERRIDE_WARNING.on(entry)) } } } @@ -126,7 +126,7 @@ class ExperimentalMarkerDeclarationAnnotationChecker(private val module: ModuleD private fun checkUseExperimentalUsage(annotationClasses: List>, trace: BindingTrace, entry: KtAnnotationEntry) { if (annotationClasses.isEmpty()) { - trace.report(Errors.USE_EXPERIMENTAL_WITHOUT_ARGUMENTS.on(entry)) + trace.report(Errors.OPT_IN_WITHOUT_ARGUMENTS.on(entry)) return } @@ -138,7 +138,7 @@ class ExperimentalMarkerDeclarationAnnotationChecker(private val module: ModuleD classDescriptor.loadExperimentalityForMarkerAnnotation() } if (experimentality == null) { - trace.report(Errors.USE_EXPERIMENTAL_ARGUMENT_IS_NOT_MARKER.on(entry, classDescriptor.fqNameSafe)) + trace.report(Errors.OPT_IN_ARGUMENT_IS_NOT_MARKER.on(entry, classDescriptor.fqNameSafe)) } } } @@ -157,7 +157,7 @@ class ExperimentalMarkerDeclarationAnnotationChecker(private val module: ModuleD val wrongTargets = allowedTargets.intersect(Experimentality.WRONG_TARGETS_FOR_MARKER) if (wrongTargets.isNotEmpty()) { trace.report( - Errors.EXPERIMENTAL_ANNOTATION_WITH_WRONG_TARGET.on( + Errors.OPT_IN_MARKER_WITH_WRONG_TARGET.on( entry, wrongTargets.joinToString(transform = KotlinTarget::description) ) @@ -170,7 +170,7 @@ class ExperimentalMarkerDeclarationAnnotationChecker(private val module: ModuleD if (retentionEntry != null) { val (entry, descriptor) = retentionEntry if (descriptor?.getAnnotationRetention() == KotlinRetention.SOURCE) { - trace.report(Errors.EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION.on(entry)) + trace.report(Errors.OPT_IN_MARKER_WITH_WRONG_RETENTION.on(entry)) } } } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExperimentalUsageChecker.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExperimentalUsageChecker.kt index 915700eb7b7..99eff1e6919 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExperimentalUsageChecker.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/checkers/ExperimentalUsageChecker.kt @@ -125,15 +125,15 @@ class ExperimentalUsageChecker(project: Project) : CallChecker { private val USAGE_DIAGNOSTICS = ExperimentalityDiagnostics( warning = ExperimentalityDiagnostic2( - Errors.EXPERIMENTAL_API_USAGE, + Errors.OPT_IN_USAGE, getDefaultDiagnosticMessage("This declaration is experimental and its usage should be marked") ), error = ExperimentalityDiagnostic2( - Errors.EXPERIMENTAL_API_USAGE_ERROR, + Errors.OPT_IN_USAGE_ERROR, getDefaultDiagnosticMessage("This declaration is experimental and its usage must be marked") ), futureError = ExperimentalityDiagnostic2( - Errors.EXPERIMENTAL_API_USAGE_FUTURE_ERROR, + Errors.OPT_IN_USAGE_FUTURE_ERROR, getDefaultDiagnosticMessage("This declaration is experimental due to signature types and its usage must be marked (will become an error in 1.6)") ), ) @@ -391,7 +391,7 @@ class ExperimentalUsageChecker(project: Project) : CallChecker { !element.isUsageAsUseExperimentalArgument(context.trace.bindingContext) ) { context.trace.report( - Errors.EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_USE_EXPERIMENTAL.on(element) + Errors.OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN.on(element) ) } } @@ -416,11 +416,11 @@ class ExperimentalUsageChecker(project: Project) : CallChecker { REQUIRES_OPT_IN_FQ_NAME.asString() !in useExperimentalFqNames && OLD_EXPERIMENTAL_FQ_NAME.asString() !in useExperimentalFqNames ) { - context.trace.report(Errors.EXPERIMENTAL_IS_NOT_ENABLED.on(element)) + context.trace.report(Errors.OPT_IN_IS_NOT_ENABLED.on(element)) } if (!element.isUsageAsAnnotationOrImport() && !element.isUsageAsQualifier()) { - context.trace.report(Errors.EXPERIMENTAL_CAN_ONLY_BE_USED_AS_ANNOTATION.on(element)) + context.trace.report(Errors.OPT_IN_CAN_ONLY_BE_USED_AS_ANNOTATION.on(element)) } } @@ -466,9 +466,9 @@ class ExperimentalUsageChecker(project: Project) : CallChecker { val reportOn = (declaration as? KtNamedDeclaration)?.nameIdentifier ?: declaration val (diagnostic, defaultMessageVerb) = when (experimentality.severity) { - Experimentality.Severity.WARNING -> Errors.EXPERIMENTAL_OVERRIDE to "should" - Experimentality.Severity.ERROR -> Errors.EXPERIMENTAL_OVERRIDE_ERROR to "must" - Experimentality.Severity.FUTURE_ERROR -> Errors.EXPERIMENTAL_OVERRIDE_ERROR to "must" + Experimentality.Severity.WARNING -> Errors.OPT_IN_OVERRIDE to "should" + Experimentality.Severity.ERROR -> Errors.OPT_IN_OVERRIDE_ERROR to "must" + Experimentality.Severity.FUTURE_ERROR -> Errors.OPT_IN_OVERRIDE_ERROR to "must" } val message = experimentality.message ?: "This declaration overrides experimental member of supertype " + diff --git a/compiler/testData/codegen/box/inference/builderInference/callableReferenceAndCoercionToUnit.kt b/compiler/testData/codegen/box/inference/builderInference/callableReferenceAndCoercionToUnit.kt index 02317a10afa..e67fb851062 100644 --- a/compiler/testData/codegen/box/inference/builderInference/callableReferenceAndCoercionToUnit.kt +++ b/compiler/testData/codegen/box/inference/builderInference/callableReferenceAndCoercionToUnit.kt @@ -1,7 +1,7 @@ // DONT_TARGET_EXACT_BACKEND: WASM // WASM_MUTE_REASON: STDLIB_COLLECTIONS // !LANGUAGE: +NewInference -// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION // WITH_RUNTIME @OptIn(ExperimentalStdlibApi::class) diff --git a/compiler/testData/codegen/box/inference/builderInference/commonSuperType.kt b/compiler/testData/codegen/box/inference/builderInference/commonSuperType.kt index fbfcc377358..8d2c85f3e74 100644 --- a/compiler/testData/codegen/box/inference/builderInference/commonSuperType.kt +++ b/compiler/testData/codegen/box/inference/builderInference/commonSuperType.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // TARGET_BACKEND: JVM diff --git a/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeCovariant.kt b/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeCovariant.kt index 412359614d0..e4f2497c6e2 100644 --- a/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeCovariant.kt +++ b/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeCovariant.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // TARGET_BACKEND: JVM // DONT_TARGET_EXACT_BACKEND: WASM diff --git a/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeInvariant.kt b/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeInvariant.kt index 9bb29df7618..d821e1565d1 100644 --- a/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeInvariant.kt +++ b/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeInvariant.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // DONT_TARGET_EXACT_BACKEND: WASM // TARGET_BACKEND: JVM diff --git a/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeNullable.kt b/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeNullable.kt index 40b32453871..b0720d82b42 100644 --- a/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeNullable.kt +++ b/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeNullable.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // TARGET_BACKEND: JVM // DONT_TARGET_EXACT_BACKEND: WASM diff --git a/compiler/testData/codegen/box/inference/builderInference/labaledCall.kt b/compiler/testData/codegen/box/inference/builderInference/labaledCall.kt index fe547aef1c4..a165477611a 100644 --- a/compiler/testData/codegen/box/inference/builderInference/labaledCall.kt +++ b/compiler/testData/codegen/box/inference/builderInference/labaledCall.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -UNCHECKED_CAST -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -UNCHECKED_CAST -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // DONT_TARGET_EXACT_BACKEND: WASM diff --git a/compiler/testData/codegen/box/inference/builderInference/memberScope.kt b/compiler/testData/codegen/box/inference/builderInference/memberScope.kt index 2fc919f1c77..8fe8d0a0e6a 100644 --- a/compiler/testData/codegen/box/inference/builderInference/memberScope.kt +++ b/compiler/testData/codegen/box/inference/builderInference/memberScope.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -DEPRECATION -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME // IGNORE_BACKEND_FIR: JVM_IR // DONT_TARGET_EXACT_BACKEND: WASM diff --git a/compiler/testData/codegen/box/inference/builderInference/nullability.kt b/compiler/testData/codegen/box/inference/builderInference/nullability.kt index f719dbabc12..d12b2cda9db 100644 --- a/compiler/testData/codegen/box/inference/builderInference/nullability.kt +++ b/compiler/testData/codegen/box/inference/builderInference/nullability.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -DEPRECATION -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME // DONT_TARGET_EXACT_BACKEND: WASM diff --git a/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferences.kt b/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferences.kt index ca0247c11b2..03b178c8aef 100644 --- a/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferences.kt +++ b/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferences.kt @@ -14,7 +14,7 @@ fun materialize() = null as T interface FlowCollector {} -@Suppress("EXPERIMENTAL_API_USAGE_ERROR") +@Suppress("OPT_IN_USAGE_ERROR") fun flow(@BuilderInference block: suspend FlowCollector.() -> Unit) = Flow(block) class Flow(private val block: suspend FlowCollector.() -> Unit) diff --git a/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt b/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt index cd4a2e8735e..a37c2ccfd7e 100644 --- a/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt +++ b/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION // DONT_TARGET_EXACT_BACKEND: WASM import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesErrorType.kt b/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesErrorType.kt index ca0247c11b2..03b178c8aef 100644 --- a/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesErrorType.kt +++ b/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesErrorType.kt @@ -14,7 +14,7 @@ fun materialize() = null as T interface FlowCollector {} -@Suppress("EXPERIMENTAL_API_USAGE_ERROR") +@Suppress("OPT_IN_USAGE_ERROR") fun flow(@BuilderInference block: suspend FlowCollector.() -> Unit) = Flow(block) class Flow(private val block: suspend FlowCollector.() -> Unit) diff --git a/compiler/testData/codegen/box/inference/builderInference/specialCallsWithLambdas.kt b/compiler/testData/codegen/box/inference/builderInference/specialCallsWithLambdas.kt index 87e10fd6c44..8f54ff6cd5b 100644 --- a/compiler/testData/codegen/box/inference/builderInference/specialCallsWithLambdas.kt +++ b/compiler/testData/codegen/box/inference/builderInference/specialCallsWithLambdas.kt @@ -5,7 +5,7 @@ import kotlin.experimental.ExperimentalTypeInference interface FlowCollector {} -@Suppress("EXPERIMENTAL_API_USAGE_ERROR") +@Suppress("OPT_IN_USAGE_ERROR") fun flow(@BuilderInference block: suspend FlowCollector.() -> Unit) = Flow(block) class Flow(private val block: suspend FlowCollector.() -> Unit) diff --git a/compiler/testData/codegen/box/inference/builderInference/substituteTypeVariableIntolambdaParameterDescriptor.kt b/compiler/testData/codegen/box/inference/builderInference/substituteTypeVariableIntolambdaParameterDescriptor.kt index 36c7836fc25..81091297c52 100644 --- a/compiler/testData/codegen/box/inference/builderInference/substituteTypeVariableIntolambdaParameterDescriptor.kt +++ b/compiler/testData/codegen/box/inference/builderInference/substituteTypeVariableIntolambdaParameterDescriptor.kt @@ -11,7 +11,7 @@ interface FlowCollector { fun emit(value: T) } -@Suppress("EXPERIMENTAL_API_USAGE_ERROR") +@Suppress("OPT_IN_USAGE_ERROR") fun flow(@BuilderInference block: FlowCollector.() -> Unit): I = null as I fun adapt(): Unit = flow { diff --git a/compiler/testData/codegen/box/inference/builderInference/topDownCompletionBreakedByNonBuilderInferenceSession.kt b/compiler/testData/codegen/box/inference/builderInference/topDownCompletionBreakedByNonBuilderInferenceSession.kt index fa3cf069c26..546bcfc68cb 100644 --- a/compiler/testData/codegen/box/inference/builderInference/topDownCompletionBreakedByNonBuilderInferenceSession.kt +++ b/compiler/testData/codegen/box/inference/builderInference/topDownCompletionBreakedByNonBuilderInferenceSession.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -UNUSED_PARAMETER -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCalls.kt b/compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCalls.kt index 1dc5a2728ee..de9973de920 100644 --- a/compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCalls.kt +++ b/compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCalls.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -UNUSED_PARAMETER -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt b/compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt index fbc2060c1eb..8c2be8f014b 100644 --- a/compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt +++ b/compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithThreeBuilderInferenceCallsSameLevel.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -UNUSED_PARAMETER -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithTwoBuilderInferenceCalls.kt b/compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithTwoBuilderInferenceCalls.kt index ec3dcc88182..ff87c540e62 100644 --- a/compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithTwoBuilderInferenceCalls.kt +++ b/compiler/testData/codegen/box/inference/builderInference/topDownCompletionWithTwoBuilderInferenceCalls.kt @@ -1,5 +1,5 @@ // DONT_TARGET_EXACT_BACKEND: WASM -// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -UNUSED_PARAMETER -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/codegen/box/inference/builderInference/withExpectedType.kt b/compiler/testData/codegen/box/inference/builderInference/withExpectedType.kt index 7a00e6e98d5..ca35b09f6d0 100644 --- a/compiler/testData/codegen/box/inference/builderInference/withExpectedType.kt +++ b/compiler/testData/codegen/box/inference/builderInference/withExpectedType.kt @@ -1,6 +1,6 @@ // !LANGUAGE: +UnrestrictedBuilderInference -UseBuilderInferenceOnlyIfNeeded // WITH_RUNTIME -// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE_ERROR -CAST_NEVER_SUCCEEDS +// !DIAGNOSTICS: -OPT_IN_USAGE_ERROR -CAST_NEVER_SUCCEEDS // IGNORE_BACKEND_FIR: JVM_IR // DONT_TARGET_EXACT_BACKEND: WASM diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.fir.kt index a01998420b6..69a362a0091 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.fir.kt @@ -1,5 +1,5 @@ // WITH_RUNTIME -// !DIAGNOSTICS: -EXPERIMENTAL_IS_NOT_ENABLED -DEPRECATION -EXPERIMENTAL_API_USAGE_ERROR +// !DIAGNOSTICS: -OPT_IN_IS_NOT_ENABLED -DEPRECATION -OPT_IN_USAGE_ERROR // DONT_TARGET_EXACT_BACKEND: WASM import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.kt b/compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.kt index 7100dbb1620..dcc355a13a2 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/changingResolveIfDontUseBuilderInference.kt @@ -1,5 +1,5 @@ // WITH_RUNTIME -// !DIAGNOSTICS: -EXPERIMENTAL_IS_NOT_ENABLED -DEPRECATION -EXPERIMENTAL_API_USAGE_ERROR +// !DIAGNOSTICS: -OPT_IN_IS_NOT_ENABLED -DEPRECATION -OPT_IN_USAGE_ERROR // DONT_TARGET_EXACT_BACKEND: WASM import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/kt47744.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/kt47744.fir.kt index af56be0a681..3358d298cb1 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/kt47744.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/kt47744.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: -UnrestrictedBuilderInference -// !DIAGNOSTICS: -EXPERIMENTAL_IS_NOT_ENABLED -UNCHECKED_CAST +// !DIAGNOSTICS: -OPT_IN_IS_NOT_ENABLED -UNCHECKED_CAST // WITH_RUNTIME import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/kt47744.kt b/compiler/testData/diagnostics/tests/inference/builderInference/kt47744.kt index 8027f7966d8..0a8a6c74d01 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/kt47744.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/kt47744.kt @@ -1,5 +1,5 @@ // !LANGUAGE: -UnrestrictedBuilderInference -// !DIAGNOSTICS: -EXPERIMENTAL_IS_NOT_ENABLED -UNCHECKED_CAST +// !DIAGNOSTICS: -OPT_IN_IS_NOT_ENABLED -UNCHECKED_CAST // WITH_RUNTIME import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/labaledCall.kt b/compiler/testData/diagnostics/tests/inference/builderInference/labaledCall.kt index 11d9180875a..778920fc695 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/labaledCall.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/labaledCall.kt @@ -1,5 +1,5 @@ // FIR_IDENTICAL -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -UNCHECKED_CAST -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -UNCHECKED_CAST -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: main.kt diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.fir.kt index 85598b69b00..e4b1f44e7cb 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.fir.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.kt b/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.kt index ed8ace04823..3073a21d6f3 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/simpleLambdaInCallWithAnotherLambdaWithBuilderInference.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/skipedUnresolvedInBuilderInferenceWithStubReceiverType.kt b/compiler/testData/diagnostics/tests/inference/builderInference/skipedUnresolvedInBuilderInferenceWithStubReceiverType.kt index 1a3f156b4c6..878ed61f29e 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/skipedUnresolvedInBuilderInferenceWithStubReceiverType.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/skipedUnresolvedInBuilderInferenceWithStubReceiverType.kt @@ -1,5 +1,5 @@ // FIR_IDENTICAL -// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -UNUSED_PARAMETER -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.fir.kt index 1eccb4ce35c..26bd7a792e9 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.fir.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.kt index 3d9dfa5b90e..282d34ac36b 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferences.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.fir.kt index 1ea0075357b..be2f2a4cc41 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.fir.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt index 53d2ec2b5bf..dd524046353 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.fir.kt index 0a2bee8e5fc..10583cf13b5 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.fir.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt index 98f8544e077..0e01faf8972 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorType.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorType.fir.kt index 6b6e8aac596..f5506850f7e 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorType.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorType.fir.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorType.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorType.kt index 101938fea78..d925797eb9e 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorType.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorType.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorTypeUnrestricted.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorTypeUnrestricted.fir.kt index fbcb5263855..3a2a73224c4 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorTypeUnrestricted.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorTypeUnrestricted.fir.kt @@ -1,7 +1,7 @@ // !LANGUAGE: +UnrestrictedBuilderInference // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorTypeUnrestricted.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorTypeUnrestricted.kt index 036795a1e19..0709433b5a7 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorTypeUnrestricted.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorTypeUnrestricted.kt @@ -1,7 +1,7 @@ // !LANGUAGE: +UnrestrictedBuilderInference // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.fir.kt index 1add4c83e66..4fa954f4429 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.fir.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt index 6d4430288e2..f17807e2797 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.fir.kt index 7905ecbb7e1..c629fd3dcbf 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.fir.kt @@ -1,7 +1,7 @@ // !LANGUAGE: +UnrestrictedBuilderInference // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION // KT-47797 import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.kt index a91240205ef..36c0f402b6c 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesUnrestricted.kt @@ -1,7 +1,7 @@ // !LANGUAGE: +UnrestrictedBuilderInference // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION // KT-47797 import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithLambdas.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithLambdas.fir.kt index 119e5c2e3ce..8263fceecb2 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithLambdas.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithLambdas.fir.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNUSED_LAMBDA_EXPRESSION -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNUSED_LAMBDA_EXPRESSION -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithLambdas.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithLambdas.kt index 1efc4fd16a2..7b42328f02f 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithLambdas.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithLambdas.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNUSED_LAMBDA_EXPRESSION -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNUSED_LAMBDA_EXPRESSION -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/capturedTypes.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/capturedTypes.fir.kt index f1a5d7808b4..cea6df8900d 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/capturedTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/capturedTypes.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -DEPRECATION -UNCHECKED_CAST -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -DEPRECATION -UNCHECKED_CAST -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME // FILE: main.kt diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/capturedTypes.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/capturedTypes.kt index 26a78a97b8e..ef06467e7c5 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/capturedTypes.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/capturedTypes.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -DEPRECATION -UNCHECKED_CAST -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -DEPRECATION -UNCHECKED_CAST -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME // FILE: main.kt diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperType.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperType.fir.kt index 6ec10480938..44cb5587b58 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperType.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperType.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: Test.java @@ -12,10 +12,10 @@ class Test { import kotlin.experimental.ExperimentalTypeInference @UseExperimental(ExperimentalTypeInference::class) -fun build(@BuilderInference block: TestInterface.() -> Unit): R = TODO() +fun build(@BuilderInference block: TestInterface.() -> Unit): R = TODO() @UseExperimental(ExperimentalTypeInference::class) -fun build2(@BuilderInference block: TestInterface.() -> Unit): R = TODO() +fun build2(@BuilderInference block: TestInterface.() -> Unit): R = TODO() class Inv diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperType.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperType.kt index d9c86a44a8f..ef094ed5717 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperType.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperType.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: Test.java diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeContravariant.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeContravariant.fir.kt index aba590a3a64..a2806304382 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeContravariant.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeContravariant.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: Test.java diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeContravariant.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeContravariant.kt index e2a81e295f3..7ee2d690508 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeContravariant.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeContravariant.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: Test.java diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeCovariant.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeCovariant.fir.kt index dc90ca5aa14..34574826e2e 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeCovariant.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeCovariant.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: Test.java @@ -12,10 +12,10 @@ class Test { import kotlin.experimental.ExperimentalTypeInference @UseExperimental(ExperimentalTypeInference::class) -fun build(@BuilderInference block: TestInterface.() -> Unit): R1 = TODO() +fun build(@BuilderInference block: TestInterface.() -> Unit): R1 = TODO() @UseExperimental(ExperimentalTypeInference::class) -fun build2(@BuilderInference block: TestInterface.() -> Unit): R2 = TODO() +fun build2(@BuilderInference block: TestInterface.() -> Unit): R2 = TODO() class Out diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeCovariant.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeCovariant.kt index 29413894bcb..ac7f110fe4e 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeCovariant.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeCovariant.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: Test.java diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeInvariant.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeInvariant.fir.kt index f3d89d25b55..62d9ed8badb 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeInvariant.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeInvariant.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: Test.java diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeInvariant.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeInvariant.kt index d34b768f0e8..bdecfba4e3e 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeInvariant.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeInvariant.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: Test.java diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeNullable.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeNullable.fir.kt index 693aaac30f7..7e20715bf1e 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeNullable.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeNullable.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: Test.java @@ -15,10 +15,10 @@ class Test { import kotlin.experimental.ExperimentalTypeInference @UseExperimental(ExperimentalTypeInference::class) -fun build(@BuilderInference block: TestInterface.() -> Unit): R = TODO() +fun build(@BuilderInference block: TestInterface.() -> Unit): R = TODO() @UseExperimental(ExperimentalTypeInference::class) -fun build2(@BuilderInference block: TestInterface.() -> Unit): R = TODO() +fun build2(@BuilderInference block: TestInterface.() -> Unit): R = TODO() class Inv diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeNullable.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeNullable.kt index 742939e1761..ae36f07debc 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeNullable.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/commonSuperTypeNullable.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: Test.java diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/intersect.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/intersect.fir.kt index 23b5046043e..7928c8aabf2 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/intersect.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/intersect.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -UNCHECKED_CAST -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNCHECKED_CAST -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: Test.java diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/intersect.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/intersect.kt index d1e3bda3050..f9170a61a2d 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/intersect.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/intersect.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -UNCHECKED_CAST -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNCHECKED_CAST -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // FILE: Test.java diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.fir.kt index 029098303c1..62da5998f57 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -DEPRECATION -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME // FILE: main.kt diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.kt index ff634fe9ec0..70b35774059 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -DEPRECATION -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME // FILE: main.kt diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.fir.kt index c442d2a3084..08bca01a0e2 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -DEPRECATION -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME // FILE: main.kt diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.kt index dcef946ba99..1dfac448361 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/nullability.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -DEPRECATION -OPT_IN_IS_NOT_ENABLED // WITH_RUNTIME // FILE: main.kt diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/renderingStubTypes.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/renderingStubTypes.fir.kt index 96a2acbb4ba..0559363bd52 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/renderingStubTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/renderingStubTypes.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/renderingStubTypes.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/renderingStubTypes.kt index 01d55942b6d..1992285479a 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/renderingStubTypes.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/renderingStubTypes.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +UnrestrictedBuilderInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -OPT_IN_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.fir.kt b/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.fir.kt index 7a5e81bbfaf..d40a88723d4 100644 --- a/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.fir.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.kt b/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.kt index 3b110c6a4d9..01d98c2cb04 100644 --- a/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.kt +++ b/compiler/testData/diagnostics/tests/inference/specialCallsWithCallableReferences.kt @@ -1,6 +1,6 @@ // WITH_RUNTIME // SKIP_TXT -// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -CAST_NEVER_SUCCEEDS -UNCHECKED_CAST -UNUSED_PARAMETER -UNUSED_VARIABLE -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/tests/smartCasts/kt32358_2.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/kt32358_2.fir.kt index 4959f2d5cd5..4e247d59a06 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/kt32358_2.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/kt32358_2.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +NewInference -// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE_ERROR -EXPERIMENTAL_API_USAGE_FUTURE_ERROR -UNUSED_PARAMETER +// !DIAGNOSTICS: -OPT_IN_USAGE_ERROR -OPT_IN_USAGE_FUTURE_ERROR -UNUSED_PARAMETER import kotlin.contracts.* diff --git a/compiler/testData/diagnostics/tests/smartCasts/kt32358_2.kt b/compiler/testData/diagnostics/tests/smartCasts/kt32358_2.kt index 88609e0d526..6dd08ad8da5 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/kt32358_2.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/kt32358_2.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +NewInference -// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE_ERROR -EXPERIMENTAL_API_USAGE_FUTURE_ERROR -UNUSED_PARAMETER +// !DIAGNOSTICS: -OPT_IN_USAGE_ERROR -OPT_IN_USAGE_FUTURE_ERROR -UNUSED_PARAMETER import kotlin.contracts.* diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.fir.kt index 4d87696a9bb..ef0e0455645 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.fir.kt @@ -1,6 +1,6 @@ import kotlin.contracts.* -@Suppress("EXPERIMENTAL_API_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_FUTURE_ERROR") +@Suppress("OPT_IN_USAGE_ERROR", "OPT_IN_USAGE_FUTURE_ERROR") inline fun atLeastOnce(block: () -> Unit) { contract { callsInPlace(block, InvocationKind.AT_LEAST_ONCE) @@ -8,7 +8,7 @@ inline fun atLeastOnce(block: () -> Unit) { block() } -@Suppress("EXPERIMENTAL_API_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_FUTURE_ERROR") +@Suppress("OPT_IN_USAGE_ERROR", "OPT_IN_USAGE_FUTURE_ERROR") inline fun atMostOnce(block: () -> Unit) { contract { callsInPlace(block, InvocationKind.AT_MOST_ONCE) @@ -16,7 +16,7 @@ inline fun atMostOnce(block: () -> Unit) { block() } -@Suppress("EXPERIMENTAL_API_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_FUTURE_ERROR") +@Suppress("OPT_IN_USAGE_ERROR", "OPT_IN_USAGE_FUTURE_ERROR") inline fun exactlyOnce(block: () -> Unit) { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.kt index 3ad3ff7ab04..11310e59d78 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.kt @@ -1,6 +1,6 @@ import kotlin.contracts.* -@Suppress("EXPERIMENTAL_API_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_FUTURE_ERROR") +@Suppress("OPT_IN_USAGE_ERROR", "OPT_IN_USAGE_FUTURE_ERROR") inline fun atLeastOnce(block: () -> Unit) { contract { callsInPlace(block, InvocationKind.AT_LEAST_ONCE) @@ -8,7 +8,7 @@ inline fun atLeastOnce(block: () -> Unit) { block() } -@Suppress("EXPERIMENTAL_API_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_FUTURE_ERROR") +@Suppress("OPT_IN_USAGE_ERROR", "OPT_IN_USAGE_FUTURE_ERROR") inline fun atMostOnce(block: () -> Unit) { contract { callsInPlace(block, InvocationKind.AT_MOST_ONCE) @@ -16,7 +16,7 @@ inline fun atMostOnce(block: () -> Unit) { block() } -@Suppress("EXPERIMENTAL_API_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_FUTURE_ERROR") +@Suppress("OPT_IN_USAGE_ERROR", "OPT_IN_USAGE_FUTURE_ERROR") inline fun exactlyOnce(block: () -> Unit) { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.txt b/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.txt index 7a4723aa814..3995c2920c2 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.txt +++ b/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByAtLeastOnce.txt @@ -1,12 +1,12 @@ package -@kotlin.Suppress(names = {"EXPERIMENTAL_API_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_FUTURE_ERROR"}) public inline fun atLeastOnce(/*0*/ block: () -> kotlin.Unit): kotlin.Unit +@kotlin.Suppress(names = {"OPT_IN_USAGE_ERROR", "OPT_IN_USAGE_FUTURE_ERROR"}) public inline fun atLeastOnce(/*0*/ block: () -> kotlin.Unit): kotlin.Unit CallsInPlace(block, AT_LEAST_ONCE) -@kotlin.Suppress(names = {"EXPERIMENTAL_API_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_FUTURE_ERROR"}) public inline fun atMostOnce(/*0*/ block: () -> kotlin.Unit): kotlin.Unit +@kotlin.Suppress(names = {"OPT_IN_USAGE_ERROR", "OPT_IN_USAGE_FUTURE_ERROR"}) public inline fun atMostOnce(/*0*/ block: () -> kotlin.Unit): kotlin.Unit CallsInPlace(block, AT_MOST_ONCE) -@kotlin.Suppress(names = {"EXPERIMENTAL_API_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_FUTURE_ERROR"}) public inline fun exactlyOnce(/*0*/ block: () -> kotlin.Unit): kotlin.Unit +@kotlin.Suppress(names = {"OPT_IN_USAGE_ERROR", "OPT_IN_USAGE_FUTURE_ERROR"}) public inline fun exactlyOnce(/*0*/ block: () -> kotlin.Unit): kotlin.Unit CallsInPlace(block, EXACTLY_ONCE) public fun test(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.fir.kt index bf1062c0255..c00758d47fe 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.fir.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.fir.kt @@ -1,6 +1,6 @@ import kotlin.contracts.* -@Suppress("EXPERIMENTAL_API_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_FUTURE_ERROR") +@Suppress("OPT_IN_USAGE_ERROR", "OPT_IN_USAGE_FUTURE_ERROR") fun foo(f1: () -> Unit, f2: () -> Unit) { contract { callsInPlace(f1, InvocationKind.EXACTLY_ONCE) diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.kt index cfaa3cb98a5..4b58c6aba38 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.kt +++ b/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.kt @@ -1,6 +1,6 @@ import kotlin.contracts.* -@Suppress("EXPERIMENTAL_API_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_FUTURE_ERROR") +@Suppress("OPT_IN_USAGE_ERROR", "OPT_IN_USAGE_FUTURE_ERROR") fun foo(f1: () -> Unit, f2: () -> Unit) { contract { callsInPlace(f1, InvocationKind.EXACTLY_ONCE) diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.txt b/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.txt index e209bfdf4b7..63e63a2e073 100644 --- a/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.txt +++ b/compiler/testData/diagnostics/tests/smartCasts/variables/capturedByMultipleLambdas.txt @@ -1,6 +1,6 @@ package -@kotlin.Suppress(names = {"EXPERIMENTAL_API_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_FUTURE_ERROR"}) public fun foo(/*0*/ f1: () -> kotlin.Unit, /*1*/ f2: () -> kotlin.Unit): kotlin.Unit +@kotlin.Suppress(names = {"OPT_IN_USAGE_ERROR", "OPT_IN_USAGE_FUTURE_ERROR"}) public fun foo(/*0*/ f1: () -> kotlin.Unit, /*1*/ f2: () -> kotlin.Unit): kotlin.Unit CallsInPlace(f1, EXACTLY_ONCE) CallsInPlace(f2, EXACTLY_ONCE) diff --git a/compiler/testData/diagnostics/tests/unsignedTypes/allowedVarargsOfUnsignedTypes.fir.kt b/compiler/testData/diagnostics/tests/unsignedTypes/allowedVarargsOfUnsignedTypes.fir.kt index 364bff0aaa1..fe81121da71 100644 --- a/compiler/testData/diagnostics/tests/unsignedTypes/allowedVarargsOfUnsignedTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/unsignedTypes/allowedVarargsOfUnsignedTypes.fir.kt @@ -1,12 +1,12 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -fun ubyte(vararg a: UByte) {} -fun ushort(vararg a: UShort) {} -fun uint(vararg a: UInt) {} -fun ulong(vararg a: ULong) {} +fun ubyte(vararg a: UByte) {} +fun ushort(vararg a: UShort) {} +fun uint(vararg a: UInt) {} +fun ulong(vararg a: ULong) {} -class ValueParam(vararg val a: ULong) +class ValueParam(vararg val a: ULong) -annotation class Ann(vararg val a: UInt) +annotation class Ann(vararg val a: UInt) -fun array(vararg a: UIntArray) {} +fun array(vararg a: UIntArray) {} diff --git a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.fir.kt b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.fir.kt index ecff0059c92..978c9a24af4 100644 --- a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.fir.kt +++ b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/conversionOfSignedToUnsigned.fir.kt @@ -33,7 +33,7 @@ fun takeUShort(@ImplicitIntegerCoercion u: UShort) {} fun takeUInt(@ImplicitIntegerCoercion u: UInt) {} fun takeULong(@ImplicitIntegerCoercion u: ULong) {} -fun takeUBytes(@ImplicitIntegerCoercion vararg u: UByte) {} +fun takeUBytes(@ImplicitIntegerCoercion vararg u: UByte) {} fun takeLong(@ImplicitIntegerCoercion l: Long) {} diff --git a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/signedToUnsignedConversionWithExpectedType.fir.kt b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/signedToUnsignedConversionWithExpectedType.fir.kt index 506abee719f..88ae90f41db 100644 --- a/compiler/testData/diagnostics/tests/unsignedTypes/conversions/signedToUnsignedConversionWithExpectedType.fir.kt +++ b/compiler/testData/diagnostics/tests/unsignedTypes/conversions/signedToUnsignedConversionWithExpectedType.fir.kt @@ -5,7 +5,7 @@ fun takeUShort(u: UShort) {} fun takeUInt(u: UInt) {} fun takeULong(u: ULong) {} -fun takeUBytes(vararg u: UByte) {} +fun takeUBytes(vararg u: UByte) {} fun takeNullableUInt(u: UInt?) {} diff --git a/compiler/testData/diagnostics/tests/unsignedTypes/varargTypeToArrayTypeCheck.fir.kt b/compiler/testData/diagnostics/tests/unsignedTypes/varargTypeToArrayTypeCheck.fir.kt index bd2717bb88d..3ecce7339af 100644 --- a/compiler/testData/diagnostics/tests/unsignedTypes/varargTypeToArrayTypeCheck.fir.kt +++ b/compiler/testData/diagnostics/tests/unsignedTypes/varargTypeToArrayTypeCheck.fir.kt @@ -1,7 +1,7 @@ -fun ubyte(vararg a: UByte): UByteArray = a -fun ushort(vararg a: UShort): UShortArray = a -fun uint(vararg a: UInt): UIntArray = a -fun ulong(vararg a: ULong): ULongArray = a +fun ubyte(vararg a: UByte): UByteArray = a +fun ushort(vararg a: UShort): UShortArray = a +fun uint(vararg a: UInt): UIntArray = a +fun ulong(vararg a: ULong): ULongArray = a -fun rawUInt(vararg a: UInt): IntArray = a +fun rawUInt(vararg a: UInt): IntArray = a diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/callableReferenceAndCoercionToUnit.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/callableReferenceAndCoercionToUnit.kt index 3e282efe0d5..7c64980a806 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/callableReferenceAndCoercionToUnit.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/callableReferenceAndCoercionToUnit.kt @@ -1,5 +1,5 @@ // FIR_IDENTICAL -// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_EXPRESSION +// !DIAGNOSTICS: -OPT_IN_USAGE_ERROR -UNUSED_EXPRESSION fun test(s: String?) { val list = buildList { diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.fir.kt index 417b1782581..2cb456de503 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.fir.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +NewInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -UNUSED_PARAMETER -OPT_IN_IS_NOT_ENABLED // ISSUE: KT-41164 import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.kt index 6b4d88d1478..7aadaa1dd5f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41164.kt @@ -1,5 +1,5 @@ // !LANGUAGE: +NewInference -// !DIAGNOSTICS: -UNUSED_PARAMETER -EXPERIMENTAL_IS_NOT_ENABLED +// !DIAGNOSTICS: -UNUSED_PARAMETER -OPT_IN_IS_NOT_ENABLED // ISSUE: KT-41164 import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41396.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41396.kt index bb8733bbb11..e5cfacf8f3e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41396.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt41396.kt @@ -1,5 +1,5 @@ // FIR_IDENTICAL -// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_PARAMETER -CAST_NEVER_SUCCEEDS +// !DIAGNOSTICS: -OPT_IN_USAGE_ERROR -UNUSED_PARAMETER -CAST_NEVER_SUCCEEDS fun Flow.transformLatest(@BuilderInference transform: suspend FlowCollector.(value: T) -> Unit) = null as Flow diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignInCoroutineContext.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignInCoroutineContext.fir.kt index 83353ec36e7..d7a41dc54df 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignInCoroutineContext.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignInCoroutineContext.fir.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNCHECKED_CAST -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_PARAMETER +// !DIAGNOSTICS: -UNCHECKED_CAST -OPT_IN_USAGE_ERROR -UNUSED_PARAMETER class Bar diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignInCoroutineContext.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignInCoroutineContext.kt index 24a4e194a6d..6a7a1c287d1 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignInCoroutineContext.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/plusAssignInCoroutineContext.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNCHECKED_CAST -EXPERIMENTAL_API_USAGE_ERROR -UNUSED_PARAMETER +// !DIAGNOSTICS: -UNCHECKED_CAST -OPT_IN_USAGE_ERROR -UNUSED_PARAMETER class Bar diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/annotation.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/annotation.kt index 8aa1ca97c14..1ebccd74908 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/annotation.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/annotation.kt @@ -111,29 +111,29 @@ package usage3 import api.* -@EAnno fun function() {} +@EAnno fun function() {} -fun parameter(@EAnno p: String) {} +fun parameter(@EAnno p: String) {} -fun parameterType(p: @EAnno String) {} +fun parameterType(p: @EAnno String) {} -fun returnType(): @EAnno Unit {} +fun returnType(): @EAnno Unit {} -@EAnno val property = "" +@EAnno val property = "" -@EAnno typealias Typealias = Unit +@EAnno typealias Typealias = Unit -@EAnno class Klass +@EAnno class Klass -annotation class AnnotationArgument(val p: EAnno) +annotation class AnnotationArgument(val p: EAnno) fun insideBody() { - @EAnno fun local() {} + @EAnno fun local() {} } -fun inDefaultArgument(f: () -> Unit = @EAnno fun() {}) {} +fun inDefaultArgument(f: () -> Unit = @EAnno fun() {}) {} -val inProperty = @EAnno fun() {} +val inProperty = @EAnno fun() {} val inPropertyAccessor: () -> Unit - get() = @EAnno fun() {} + get() = @EAnno fun() {} diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsagesAndInline.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsagesAndInline.kt index a1e0c9d0e1e..0ef53d15980 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsagesAndInline.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/bodyUsagesAndInline.kt @@ -19,10 +19,10 @@ package usage import api.* fun use1() { - f() + f() } -val use2 = f() +val use2 = f() // FILE: inline-usage.kt @@ -31,20 +31,20 @@ package usage import api.* inline fun inlineUse1() { - f() + f() } inline var inlineUse2: Unit get() { - f() + f() } set(value) { - f() + f() } var inlineUse3: Unit inline get() { - f() + f() } @API inline set(value) { @@ -63,23 +63,23 @@ package usage import api.* private inline fun privateInline1() { - f() + f() } internal inline fun privateInline2() { - f() + f() } private inline var privateInline3: Unit get() { - f() + f() } set(value) { - f() + f() } internal class InternalClass { inline fun privateInline4() { - f() + f() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.fir.kt index b0b6b1e44d8..8e90b89c3ae 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.fir.kt @@ -80,10 +80,10 @@ package usage3 import api.* fun use() { - val c: C = C() - c.function() - c.property - C.Nested() - c.Inner() - c.extension() + val c: C = C() + c.function() + c.property + C.Nested() + c.Inner() + c.extension() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.kt index a332420920b..d0f7c30ab9b 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/classMembers.kt @@ -80,10 +80,10 @@ package usage3 import api.* fun use() { - val c: C = C() - c.function() - c.property - C.Nested() - c.Inner() - c.extension() + val c: C = C() + c.function() + c.property + C.Nested() + c.Inner() + c.extension() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/classMembersOverlyExperimental.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/classMembersOverlyExperimental.kt index ec8df0f964d..9da6d1ac606 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/classMembersOverlyExperimental.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/classMembersOverlyExperimental.kt @@ -31,8 +31,8 @@ package usage import api.* fun use() { - val c: C = C() - c.function() - c.property - C.Nested().nestedFunction() + val c: C = C() + c.function() + c.property + C.Nested().nestedFunction() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/constVal.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/constVal.fir.kt index d13a4c29aa4..99bbeb29c73 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/constVal.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/constVal.fir.kt @@ -40,5 +40,5 @@ package usage3 import api.* -@Anno(MEANING) +@Anno(MEANING) fun usage() {} diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/constVal.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/constVal.kt index 392113f0a5f..d44817c77df 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/constVal.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/constVal.kt @@ -31,7 +31,7 @@ package usage2 import api.* // TODO: there should be no warning here -@Anno(MEANING) +@Anno(MEANING) fun usage() {} // FILE: usage-none.kt @@ -40,5 +40,5 @@ package usage3 import api.* -@Anno(MEANING) +@Anno(MEANING) fun usage() {} diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/deeplyNestedClass.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/deeplyNestedClass.fir.kt index 635810cb678..27b01f5559c 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/deeplyNestedClass.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/deeplyNestedClass.fir.kt @@ -52,7 +52,7 @@ package usage3 import api.* fun use1() { - C.D.E.F() + C.D.E.F() } -fun use2(f: C.D.E.F) = f.hashCode() +fun use2(f: C.D.E.F) = f.hashCode() diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/deeplyNestedClass.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/deeplyNestedClass.kt index 9432a69cb49..0caf2efd6db 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/deeplyNestedClass.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/deeplyNestedClass.kt @@ -52,7 +52,7 @@ package usage3 import api.* fun use1() { - C.D.E.F() + C.D.E.F() } -fun use2(f: C.D.E.F) = f.hashCode() +fun use2(f: C.D.E.F) = f.hashCode() diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/errors.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/errors.fir.kt index 68fa30bf603..1538c5cb704 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/errors.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/errors.fir.kt @@ -23,5 +23,5 @@ class Derived : Base() { } fun test(b: Base) { - b.foo() + b.foo() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/errors.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/errors.kt index c681a01b008..501d1e2820b 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/errors.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/errors.kt @@ -19,9 +19,9 @@ package usage import api.* class Derived : Base() { - override fun foo() {} + override fun foo() {} } fun test(b: Base) { - b.foo() + b.foo() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalIsNotEnabled.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalIsNotEnabled.kt index 44c8bd04680..bd3339ee87b 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalIsNotEnabled.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalIsNotEnabled.kt @@ -1,7 +1,7 @@ // FIR_IDENTICAL // FILE: api.kt -@RequiresOptIn +@RequiresOptIn @Retention(AnnotationRetention.BINARY) annotation class Marker @@ -11,7 +11,7 @@ fun f() {} // FILE: usage.kt fun use1() { - f() + f() } @Marker @@ -19,7 +19,7 @@ fun use2() { f() } -@OptIn(Marker::class) +@OptIn(Marker::class) fun use3() { f() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalOnOverrideWarning.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalOnOverrideWarning.kt index cc142f2a45b..aba62e99432 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalOnOverrideWarning.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalOnOverrideWarning.kt @@ -6,7 +6,7 @@ annotation class E class My { - @E + @E override fun hashCode() = 0 } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalSetter.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalSetter.kt index b8b2390f2ad..7da8c23bb85 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalSetter.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalSetter.kt @@ -17,8 +17,8 @@ var z: Int = 44 } fun user(): Int { - x = 10 - y = 5 - x = 15 - return x + y + z + x = 10 + y = 5 + x = 15 + return x + y + z } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsages.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsages.fir.kt index ed293ced957..75dd0c7fc6b 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsages.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsages.fir.kt @@ -10,15 +10,15 @@ annotation class Marker interface Some abstract class User { - abstract fun createSome(): Some - fun Some?.onSome() {} - fun withSome(some: Some? = null) {} + abstract fun createSome(): Some + fun Some?.onSome() {} + fun withSome(some: Some? = null) {} fun use() { - val something = createSome() - val somethingOther: Some = createSome() - null.onSome() - withSome() + val something = createSome() + val somethingOther: Some = createSome() + null.onSome() + withSome() } } @@ -26,15 +26,15 @@ data class DataClass(@property:Marker val x: Int) fun useDataClass(d: DataClass) { // Should have error in both - d.x + d.x val (x) = d } -typealias My = Some +typealias My = Some -fun my(my: My) {} +fun my(my: My) {} -fun your(my: Some) {} +fun your(my: Some) {} @Marker interface ExperimentalType { @@ -49,7 +49,7 @@ interface NotExperimentalExtension : ExperimentalType { fun use(arg: NotExperimentalExtension) { arg.foo() - arg.bar() + arg.bar() } @Marker @@ -68,7 +68,7 @@ typealias MyList = ArrayList typealias YourList = ArrayList fun main() { - val x = listOf(A(), B()) + val x = listOf(A(), B()) val y = MyList() val z = YourList() YourList().add("") @@ -84,7 +84,7 @@ object O { operator fun provideDelegate(x: Any?, y: Any?): C = C() } -val x: String by O +val x: String by O @Marker class OperatorContainer : Comparable { @@ -117,8 +117,8 @@ operator fun String.minus(s: String) = OperatorContainer() operator fun String.invoke() = OperatorContainer() fun operatorContainerUsage(s: String, a: AnotherContainer) { - val res1 = s - s - val res2 = s() - val res3 = res1 > res2 - for (c in a) {} + val res1 = s - s + val res2 = s() + val res3 = res1 > res2 + for (c in a) {} } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsages.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsages.kt index f4a79472e0d..e2e39fcdc53 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsages.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsages.kt @@ -10,15 +10,15 @@ annotation class Marker interface Some abstract class User { - abstract fun createSome(): Some - fun Some?.onSome() {} - fun withSome(some: Some? = null) {} + abstract fun createSome(): Some + fun Some?.onSome() {} + fun withSome(some: Some? = null) {} fun use() { - val something = createSome() - val somethingOther: Some = createSome() - null.onSome() - withSome() + val something = createSome() + val somethingOther: Some = createSome() + null.onSome() + withSome() } } @@ -26,15 +26,15 @@ data class DataClass(@property:Marker val x: Int) fun useDataClass(d: DataClass) { // Should have error in both - d.x - val (x) = d + d.x + val (x) = d } -typealias My = Some +typealias My = Some -fun my(my: My) {} +fun my(my: My) {} -fun your(my: Some) {} +fun your(my: Some) {} @Marker interface ExperimentalType { @@ -68,10 +68,10 @@ typealias MyList = ArrayList typealias YourList = ArrayList fun main() { - val x = listOf(A(), B()) - val y = MyList() - val z = YourList() - YourList().add("") + val x = listOf(A(), B()) + val y = MyList() + val z = YourList() + YourList().add("") } @Marker @@ -84,7 +84,7 @@ object O { operator fun provideDelegate(x: Any?, y: Any?): C = C() } -val x: String by O +val x: String by O @Marker class OperatorContainer : Comparable { @@ -117,8 +117,8 @@ operator fun String.minus(s: String) = OperatorContainer() operator fun String.invoke() = OperatorContainer() fun operatorContainerUsage(s: String, a: AnotherContainer) { - val res1 = s - s - val res2 = s() - val res3 = res1 > res2 - for (c in a) {} + val res1 = s - s + val res2 = s() + val res3 = res1 > res2 + for (c in a) {} } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsagesFuture.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsagesFuture.fir.kt index 2ba316add2e..b7914d329ea 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsagesFuture.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsagesFuture.fir.kt @@ -10,15 +10,15 @@ annotation class Marker interface Some abstract class User { - abstract fun createSome(): Some - fun Some?.onSome() {} - fun withSome(some: Some? = null) {} + abstract fun createSome(): Some + fun Some?.onSome() {} + fun withSome(some: Some? = null) {} fun use() { - val something = createSome() - val somethingOther: Some = createSome() - null.onSome() - withSome() + val something = createSome() + val somethingOther: Some = createSome() + null.onSome() + withSome() } } @@ -26,15 +26,15 @@ data class DataClass(@property:Marker val x: Int) fun useDataClass(d: DataClass) { // Should have error in both - d.x + d.x val (x) = d } -typealias My = Some +typealias My = Some -fun my(my: My) {} +fun my(my: My) {} -fun your(my: Some) {} +fun your(my: Some) {} @Marker interface ExperimentalType { @@ -49,7 +49,7 @@ interface NotExperimentalExtension : ExperimentalType { fun use(arg: NotExperimentalExtension) { arg.foo() - arg.bar() + arg.bar() } @Marker @@ -68,7 +68,7 @@ typealias MyList = ArrayList typealias YourList = ArrayList fun main() { - val x = listOf(A(), B()) + val x = listOf(A(), B()) val y = MyList() val z = YourList() YourList().add("") @@ -84,7 +84,7 @@ object O { operator fun provideDelegate(x: Any?, y: Any?): C = C() } -val x: String by O +val x: String by O @Marker class OperatorContainer : Comparable { @@ -117,8 +117,8 @@ operator fun String.minus(s: String) = OperatorContainer() operator fun String.invoke() = OperatorContainer() fun operatorContainerUsage(s: String, a: AnotherContainer) { - val res1 = s - s - val res2 = s() - val res3 = res1 > res2 - for (c in a) {} + val res1 = s - s + val res2 = s() + val res3 = res1 > res2 + for (c in a) {} } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsagesFuture.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsagesFuture.kt index 2ee4ec1c8f9..18be4779cf4 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsagesFuture.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/implicitUsagesFuture.kt @@ -10,15 +10,15 @@ annotation class Marker interface Some abstract class User { - abstract fun createSome(): Some - fun Some?.onSome() {} - fun withSome(some: Some? = null) {} + abstract fun createSome(): Some + fun Some?.onSome() {} + fun withSome(some: Some? = null) {} fun use() { - val something = createSome() - val somethingOther: Some = createSome() - null.onSome() - withSome() + val something = createSome() + val somethingOther: Some = createSome() + null.onSome() + withSome() } } @@ -26,15 +26,15 @@ data class DataClass(@property:Marker val x: Int) fun useDataClass(d: DataClass) { // Should have error in both - d.x - val (x) = d + d.x + val (x) = d } -typealias My = Some +typealias My = Some -fun my(my: My) {} +fun my(my: My) {} -fun your(my: Some) {} +fun your(my: Some) {} @Marker interface ExperimentalType { @@ -68,10 +68,10 @@ typealias MyList = ArrayList typealias YourList = ArrayList fun main() { - val x = listOf(A(), B()) - val y = MyList() - val z = YourList() - YourList().add("") + val x = listOf(A(), B()) + val y = MyList() + val z = YourList() + YourList().add("") } @Marker @@ -84,7 +84,7 @@ object O { operator fun provideDelegate(x: Any?, y: Any?): C = C() } -val x: String by O +val x: String by O @Marker class OperatorContainer : Comparable { @@ -117,8 +117,8 @@ operator fun String.minus(s: String) = OperatorContainer() operator fun String.invoke() = OperatorContainer() fun operatorContainerUsage(s: String, a: AnotherContainer) { - val res1 = s - s - val res2 = s() - val res3 = res1 > res2 - for (c in a) {} + val res1 = s - s + val res2 = s() + val res3 = res1 > res2 + for (c in a) {} } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectTargetsForExperimentalAnnotation.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectTargetsForExperimentalAnnotation.fir.kt index 87afaeab41f..e133739a136 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectTargetsForExperimentalAnnotation.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectTargetsForExperimentalAnnotation.fir.kt @@ -13,21 +13,21 @@ import kotlin.annotation.AnnotationTarget.* annotation class E1 @RequiresOptIn(level = RequiresOptIn.Level.WARNING) -@Target(FILE) +@Target(FILE) annotation class E2 @RequiresOptIn(level = RequiresOptIn.Level.WARNING) -@Target(EXPRESSION) -@Retention(AnnotationRetention.SOURCE) +@Target(EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class E3 @RequiresOptIn(level = RequiresOptIn.Level.WARNING) -@Target(TYPE_PARAMETER) +@Target(TYPE_PARAMETER) @Retention(AnnotationRetention.BINARY) annotation class E3A @RequiresOptIn(level = RequiresOptIn.Level.WARNING) -@Target(TYPE) +@Target(TYPE) @Retention(AnnotationRetention.BINARY) annotation class E3B diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectTargetsForExperimentalAnnotation.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectTargetsForExperimentalAnnotation.kt index 8e2a288c8c6..5c8ece94e71 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectTargetsForExperimentalAnnotation.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectTargetsForExperimentalAnnotation.kt @@ -13,21 +13,21 @@ import kotlin.annotation.AnnotationTarget.* annotation class E1 @RequiresOptIn(level = RequiresOptIn.Level.WARNING) -@Target(FILE) +@Target(FILE) annotation class E2 @RequiresOptIn(level = RequiresOptIn.Level.WARNING) -@Target(EXPRESSION) -@Retention(AnnotationRetention.SOURCE) +@Target(EXPRESSION) +@Retention(AnnotationRetention.SOURCE) annotation class E3 @RequiresOptIn(level = RequiresOptIn.Level.WARNING) -@Target(TYPE_PARAMETER) +@Target(TYPE_PARAMETER) @Retention(AnnotationRetention.BINARY) annotation class E3A @RequiresOptIn(level = RequiresOptIn.Level.WARNING) -@Target(TYPE) +@Target(TYPE) @Retention(AnnotationRetention.BINARY) annotation class E3B @@ -47,16 +47,16 @@ annotation class E5 annotation class E6 var some: Int - @E4 + @E4 get() = 42 @E5 set(value) {} -@get:E4 +@get:E4 val another: Int = 42 class My { - @E6 + @E6 override fun hashCode() = 0 } @@ -72,24 +72,24 @@ interface Base { } class Derived : Base { - @E6 + @E6 override val bar: Int = 42 - @set:E6 @setparam:E6 + @set:E6 @setparam:E6 override var baz: Int = 13 @E6 override fun foo() {} - override fun @receiver:E6 String.withReceiver() {} + override fun @receiver:E6 String.withReceiver() {} } -abstract class Another(@param:E6 val x: String) : Base { - @delegate:E6 +abstract class Another(@param:E6 val x: String) : Base { + @delegate:E6 override val bar: Int by lazy { 42 } - fun baz(@E6 param: Int) { - @E6 val x = param + fun baz(@E6 param: Int) { + @E6 val x = param } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectUseExperimental.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectUseExperimental.kt index 704e23b3e0d..713c733b139 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectUseExperimental.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/incorrectUseExperimental.kt @@ -3,8 +3,8 @@ annotation class NotAMarker -@OptIn +@OptIn fun f1() {} -@OptIn(NotAMarker::class) +@OptIn(NotAMarker::class) fun f2() {} diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/override.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/override.kt index bbdce2d4bac..46f3aa8be21 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/override.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/override.kt @@ -13,7 +13,7 @@ open class Base { } class DerivedInSameModule : Base() { - override fun foo() {} + override fun foo() {} } // FILE: usage-propagate.kt @@ -41,5 +41,5 @@ package usage2 import api.* class Derived : Base() { - override fun foo() {} + override fun foo() {} } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/overrideDifferentExperimentalities.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/overrideDifferentExperimentalities.kt index ff6f0b2e990..3fe23aea1d6 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/overrideDifferentExperimentalities.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/overrideDifferentExperimentalities.kt @@ -23,12 +23,12 @@ interface Base3 { } class DerivedA : Base1, Base2, Base3 { - override fun foo() {} + override fun foo() {} } class DerivedB : Base1, Base3 { @E3 - override fun foo() {} + override fun foo() {} } class DerivedC : Base1, Base2, Base3 { diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/scripts.kts b/compiler/testData/diagnostics/testsWithStdLib/experimental/scripts.kts index 3d80857c1a0..e1a4b4843a1 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/scripts.kts +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/scripts.kts @@ -19,8 +19,8 @@ fun use() { function() } -function() -use() +function() +use() // FILE: usage-use.kts @@ -39,8 +39,8 @@ use() import api.* fun use() { - function() + function() } -function() +function() use() diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/topLevel.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/topLevel.kt index 20c4b19f417..f839d32b20a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/topLevel.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/topLevel.kt @@ -73,8 +73,8 @@ package usage3 import api.* fun use() { - function() - property - val s: Typealias = "" - s.hashCode() + function() + property + val s: Typealias = "" + s.hashCode() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/typealias.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/typealias.kt index da925b7db54..c13e313c12a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/typealias.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/typealias.kt @@ -12,4 +12,4 @@ annotation class ExperimentalAPI @ExperimentalAPI class Foo -typealias Bar = Foo +typealias Bar = Foo diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/usageNotAsAnnotation.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/usageNotAsAnnotation.fir.kt index 818493e92af..4f0d8cb5582 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/usageNotAsAnnotation.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/usageNotAsAnnotation.fir.kt @@ -21,11 +21,11 @@ annotation class M // Usages as types should be errors -fun f1(e: RequiresOptIn) {} -fun f2(u: OptIn?) {} +fun f1(e: RequiresOptIn) {} +fun f2(u: OptIn?) {} -typealias Experimental0 = RequiresOptIn -typealias OptIn0 = OptIn +typealias Experimental0 = RequiresOptIn +typealias OptIn0 = OptIn fun f3(e: Experimental0 /* TODO */) {} fun f4(u: OptIn0 /* TODO */) {} @@ -35,10 +35,10 @@ fun f4(u: OptIn0 /* TODO */) {} annotation class VarargKClasses(vararg val k: KClass<*>) @VarargKClasses( - RequiresOptIn::class, - OptIn::class, - kotlin.RequiresOptIn::class, - kotlin.OptIn::class + RequiresOptIn::class, + OptIn::class, + kotlin.RequiresOptIn::class, + kotlin.OptIn::class ) fun f5() {} @@ -54,11 +54,11 @@ annotation class Marker { } } -fun f6(m: Marker) {} -fun f7(): List<Marker>? = null -fun f8(): test.Marker? = null +fun f6(m: Marker) {} +fun f7(): List<Marker>? = null +fun f8(): test.Marker? = null -typealias Marker0 = Marker +typealias Marker0 = Marker fun f9(m: Marker0) {} diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/usageNotAsAnnotation.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/usageNotAsAnnotation.kt index 9f4b7280aa3..18c0ca0e810 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/usageNotAsAnnotation.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/usageNotAsAnnotation.kt @@ -21,11 +21,11 @@ annotation class M // Usages as types should be errors -fun f1(e: RequiresOptIn) {} -fun f2(u: OptIn?) {} +fun f1(e: RequiresOptIn) {} +fun f2(u: OptIn?) {} -typealias Experimental0 = RequiresOptIn -typealias OptIn0 = OptIn +typealias Experimental0 = RequiresOptIn +typealias OptIn0 = OptIn fun f3(e: Experimental0 /* TODO */) {} fun f4(u: OptIn0 /* TODO */) {} @@ -35,10 +35,10 @@ fun f4(u: OptIn0 /* TODO */) {} annotation class VarargKClasses(vararg val k: KClass<*>) @VarargKClasses( - RequiresOptIn::class, - OptIn::class, - kotlin.RequiresOptIn::class, - kotlin.OptIn::class + RequiresOptIn::class, + OptIn::class, + kotlin.RequiresOptIn::class, + kotlin.OptIn::class ) fun f5() {} @@ -54,19 +54,19 @@ annotation class Marker { } } -fun f6(m: Marker) {} -fun f7(): List<Marker>? = null -fun f8(): test.Marker? = null +fun f6(m: Marker) {} +fun f7(): List<Marker>? = null +fun f8(): test.Marker? = null -typealias Marker0 = Marker +typealias Marker0 = Marker -fun f9(m: Marker0) {} +fun f9(m: Marker0) {} // Usages of markers as qualifiers are errors as well (we can lift this restriction for select cases) -fun f10(m: Marker.NestedClass) { - Marker.value +fun f10(m: Marker.NestedClass) { + Marker.value } // FILE: usage-from-other-file.kt @@ -74,5 +74,5 @@ fun f10(m: Marker.NestedClass -import test.Marker.Companion +import test.Marker.NestedClass +import test.Marker.Companion diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnFile.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnFile.kt index 9959d8bbbe4..c5e2a50aa8b 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnFile.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalOnFile.kt @@ -29,12 +29,12 @@ import api.* fun use() { compilation() - runtime() + runtime() } class Use { fun use() { compilation() - runtime() + runtime() } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalWithSeveralAnnotations.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalWithSeveralAnnotations.kt index 3b08b28827d..4335fa70306 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalWithSeveralAnnotations.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/useExperimentalWithSeveralAnnotations.kt @@ -52,5 +52,5 @@ fun use2() { fun use3() { e1() e2() - e3() + e3() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/wasExperimental.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/wasExperimental.kt index 6cd6b051419..a43359e01dc 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/wasExperimental.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/wasExperimental.kt @@ -24,12 +24,12 @@ class NewClassExperimentalInThePast @SinceKotlin("1.4") @WasExperimental(Marker::class) -typealias TypeAliasToNewClass = NewClassExperimentalInThePast +typealias TypeAliasToNewClass = NewClassExperimentalInThePast fun use1( - c1: NewClassExperimentalInThePast, - t1: TypeAliasToNewClass + c1: NewClassExperimentalInThePast, + t1: TypeAliasToNewClass ) { newPublishedFun() newFunExperimentalInThePast() diff --git a/compiler/testData/diagnostics/testsWithStdLib/experimental/wrongTargetsWithoutExplicitTarget.kt b/compiler/testData/diagnostics/testsWithStdLib/experimental/wrongTargetsWithoutExplicitTarget.kt index ac141c1f408..0ef48f3dcd8 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/experimental/wrongTargetsWithoutExplicitTarget.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/experimental/wrongTargetsWithoutExplicitTarget.kt @@ -8,18 +8,18 @@ annotation class SomeOptInMarker annotation class OtherOptInMarker class IntWrapper( - @SomeOptInMarker - @OtherOptInMarker + @SomeOptInMarker + @OtherOptInMarker val value: Int ) { val isEven: Boolean - @SomeOptInMarker - @OtherOptInMarker + @SomeOptInMarker + @OtherOptInMarker get() = (value % 2) == 0 } fun foo() { - @SomeOptInMarker - @OtherOptInMarker + @SomeOptInMarker + @OtherOptInMarker val value = 2 } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/multipleOverloads_1.kt b/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/multipleOverloads_1.kt index 485b9617821..e3313dc6e0f 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/multipleOverloads_1.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/multipleOverloads_1.kt @@ -1,6 +1,6 @@ // FIR_IDENTICAL // !LANGUAGE: +NewInference +OverloadResolutionByLambdaReturnType -// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_EXPRESSION -EXPERIMENTAL_API_USAGE -EXPERIMENTAL_UNSIGNED_LITERALS +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_EXPRESSION -OPT_IN_USAGE -EXPERIMENTAL_UNSIGNED_LITERALS // ISSUE: KT-11265 // FILE: OverloadResolutionByLambdaReturnType.kt diff --git a/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/multipleOverloads_2.kt b/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/multipleOverloads_2.kt index 9dc84763c39..f6845e2e661 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/multipleOverloads_2.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/multipleOverloads_2.kt @@ -1,6 +1,6 @@ // FIR_IDENTICAL // !LANGUAGE: +NewInference +OverloadResolutionByLambdaReturnType -// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_EXPRESSION -EXPERIMENTAL_API_USAGE -EXPERIMENTAL_UNSIGNED_LITERALS +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_EXPRESSION -OPT_IN_USAGE -EXPERIMENTAL_UNSIGNED_LITERALS // ISSUE: KT-11265 // FILE: OverloadResolutionByLambdaReturnType.kt diff --git a/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/multipleOverloads_3.kt b/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/multipleOverloads_3.kt index 7e25ef482b2..07c8d461c4a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/multipleOverloads_3.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/multipleOverloads_3.kt @@ -1,6 +1,6 @@ // FIR_IDENTICAL // !LANGUAGE: +NewInference +OverloadResolutionByLambdaReturnType -// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_EXPRESSION -EXPERIMENTAL_API_USAGE -EXPERIMENTAL_UNSIGNED_LITERALS +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_EXPRESSION -OPT_IN_USAGE -EXPERIMENTAL_UNSIGNED_LITERALS // ISSUE: KT-11265 // FILE: OverloadResolutionByLambdaReturnType.kt diff --git a/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/returnFromInlineLambda.kt b/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/returnFromInlineLambda.kt index 028410467b6..1b7a5e8d96d 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/returnFromInlineLambda.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/factoryPattern/returnFromInlineLambda.kt @@ -1,6 +1,6 @@ // FIR_IDENTICAL // !LANGUAGE: +NewInference +OverloadResolutionByLambdaReturnType -// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_EXPRESSION -EXPERIMENTAL_API_USAGE -EXPERIMENTAL_UNSIGNED_LITERALS +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNUSED_EXPRESSION -OPT_IN_USAGE -EXPERIMENTAL_UNSIGNED_LITERALS // ISSUE: KT-11265 // FILE: OverloadResolutionByLambdaReturnType.kt diff --git a/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.fir.kt index 93316445f67..5b65c427fd2 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.fir.kt @@ -2,9 +2,9 @@ fun main() { val list = listOf(A()) - list.forEach(A::foo) + list.forEach(A::foo) list.forEach { - it.foo() + it.foo() } } @@ -15,5 +15,5 @@ class A { } } -@RequiresOptIn(level = RequiresOptIn.Level.ERROR) +@RequiresOptIn(level = RequiresOptIn.Level.ERROR) annotation class ExperimentalTime diff --git a/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.kt b/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.kt index 89908ecacf8..92aff91eed5 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/regression/kt34391.kt @@ -2,9 +2,9 @@ fun main() { val list = listOf(A()) - list.forEach(A::foo) + list.forEach(A::foo) list.forEach { - it.foo() + it.foo() } } @@ -15,5 +15,5 @@ class A { } } -@RequiresOptIn(level = RequiresOptIn.Level.ERROR) +@RequiresOptIn(level = RequiresOptIn.Level.ERROR) annotation class ExperimentalTime diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDataClassConverters.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDataClassConverters.kt index d98f383a8a9..b5cec31d829 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDataClassConverters.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDataClassConverters.kt @@ -871,78 +871,78 @@ internal val KT_DIAGNOSTIC_CONVERTER = KtDiagnosticConverterBuilder.buildConvert token, ) } - add(FirErrors.EXPERIMENTAL_API_USAGE) { firDiagnostic -> - ExperimentalApiUsageImpl( + add(FirErrors.OPT_IN_USAGE) { firDiagnostic -> + OptInUsageImpl( firDiagnostic.a, firDiagnostic.b, firDiagnostic as FirPsiDiagnostic, token, ) } - add(FirErrors.EXPERIMENTAL_API_USAGE_ERROR) { firDiagnostic -> - ExperimentalApiUsageErrorImpl( + add(FirErrors.OPT_IN_USAGE_ERROR) { firDiagnostic -> + OptInUsageErrorImpl( firDiagnostic.a, firDiagnostic.b, firDiagnostic as FirPsiDiagnostic, token, ) } - add(FirErrors.EXPERIMENTAL_OVERRIDE) { firDiagnostic -> - ExperimentalOverrideImpl( + add(FirErrors.OPT_IN_OVERRIDE) { firDiagnostic -> + OptInOverrideImpl( firDiagnostic.a, firDiagnostic.b, firDiagnostic as FirPsiDiagnostic, token, ) } - add(FirErrors.EXPERIMENTAL_OVERRIDE_ERROR) { firDiagnostic -> - ExperimentalOverrideErrorImpl( + add(FirErrors.OPT_IN_OVERRIDE_ERROR) { firDiagnostic -> + OptInOverrideErrorImpl( firDiagnostic.a, firDiagnostic.b, firDiagnostic as FirPsiDiagnostic, token, ) } - add(FirErrors.EXPERIMENTAL_IS_NOT_ENABLED) { firDiagnostic -> - ExperimentalIsNotEnabledImpl( + add(FirErrors.OPT_IN_IS_NOT_ENABLED) { firDiagnostic -> + OptInIsNotEnabledImpl( firDiagnostic as FirPsiDiagnostic, token, ) } - add(FirErrors.EXPERIMENTAL_CAN_ONLY_BE_USED_AS_ANNOTATION) { firDiagnostic -> - ExperimentalCanOnlyBeUsedAsAnnotationImpl( + add(FirErrors.OPT_IN_CAN_ONLY_BE_USED_AS_ANNOTATION) { firDiagnostic -> + OptInCanOnlyBeUsedAsAnnotationImpl( firDiagnostic as FirPsiDiagnostic, token, ) } - add(FirErrors.EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_USE_EXPERIMENTAL) { firDiagnostic -> - ExperimentalMarkerCanOnlyBeUsedAsAnnotationOrArgumentInUseExperimentalImpl( + add(FirErrors.OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN) { firDiagnostic -> + OptInMarkerCanOnlyBeUsedAsAnnotationOrArgumentInOptInImpl( firDiagnostic as FirPsiDiagnostic, token, ) } - add(FirErrors.USE_EXPERIMENTAL_WITHOUT_ARGUMENTS) { firDiagnostic -> - UseExperimentalWithoutArgumentsImpl( + add(FirErrors.OPT_IN_WITHOUT_ARGUMENTS) { firDiagnostic -> + OptInWithoutArgumentsImpl( firDiagnostic as FirPsiDiagnostic, token, ) } - add(FirErrors.USE_EXPERIMENTAL_ARGUMENT_IS_NOT_MARKER) { firDiagnostic -> - UseExperimentalArgumentIsNotMarkerImpl( + add(FirErrors.OPT_IN_ARGUMENT_IS_NOT_MARKER) { firDiagnostic -> + OptInArgumentIsNotMarkerImpl( firDiagnostic.a, firDiagnostic as FirPsiDiagnostic, token, ) } - add(FirErrors.EXPERIMENTAL_ANNOTATION_WITH_WRONG_TARGET) { firDiagnostic -> - ExperimentalAnnotationWithWrongTargetImpl( + add(FirErrors.OPT_IN_MARKER_WITH_WRONG_TARGET) { firDiagnostic -> + OptInMarkerWithWrongTargetImpl( firDiagnostic.a, firDiagnostic as FirPsiDiagnostic, token, ) } - add(FirErrors.EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION) { firDiagnostic -> - ExperimentalAnnotationWithWrongRetentionImpl( + add(FirErrors.OPT_IN_MARKER_WITH_WRONG_RETENTION) { firDiagnostic -> + OptInMarkerWithWrongRetentionImpl( firDiagnostic as FirPsiDiagnostic, token, ) diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnostics.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnostics.kt index 2bda53b9ab8..8b5db0035b5 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnostics.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnostics.kt @@ -626,58 +626,58 @@ sealed class KtFirDiagnostic : KtDiagnosticWithPsi { override val diagnosticClass get() = RepeatedAnnotationWarning::class } - abstract class ExperimentalApiUsage : KtFirDiagnostic() { - override val diagnosticClass get() = ExperimentalApiUsage::class + abstract class OptInUsage : KtFirDiagnostic() { + override val diagnosticClass get() = OptInUsage::class abstract val optInMarkerFqName: FqName abstract val message: String } - abstract class ExperimentalApiUsageError : KtFirDiagnostic() { - override val diagnosticClass get() = ExperimentalApiUsageError::class + abstract class OptInUsageError : KtFirDiagnostic() { + override val diagnosticClass get() = OptInUsageError::class abstract val optInMarkerFqName: FqName abstract val message: String } - abstract class ExperimentalOverride : KtFirDiagnostic() { - override val diagnosticClass get() = ExperimentalOverride::class + abstract class OptInOverride : KtFirDiagnostic() { + override val diagnosticClass get() = OptInOverride::class abstract val optInMarkerFqName: FqName abstract val message: String } - abstract class ExperimentalOverrideError : KtFirDiagnostic() { - override val diagnosticClass get() = ExperimentalOverrideError::class + abstract class OptInOverrideError : KtFirDiagnostic() { + override val diagnosticClass get() = OptInOverrideError::class abstract val optInMarkerFqName: FqName abstract val message: String } - abstract class ExperimentalIsNotEnabled : KtFirDiagnostic() { - override val diagnosticClass get() = ExperimentalIsNotEnabled::class + abstract class OptInIsNotEnabled : KtFirDiagnostic() { + override val diagnosticClass get() = OptInIsNotEnabled::class } - abstract class ExperimentalCanOnlyBeUsedAsAnnotation : KtFirDiagnostic() { - override val diagnosticClass get() = ExperimentalCanOnlyBeUsedAsAnnotation::class + abstract class OptInCanOnlyBeUsedAsAnnotation : KtFirDiagnostic() { + override val diagnosticClass get() = OptInCanOnlyBeUsedAsAnnotation::class } - abstract class ExperimentalMarkerCanOnlyBeUsedAsAnnotationOrArgumentInUseExperimental : KtFirDiagnostic() { - override val diagnosticClass get() = ExperimentalMarkerCanOnlyBeUsedAsAnnotationOrArgumentInUseExperimental::class + abstract class OptInMarkerCanOnlyBeUsedAsAnnotationOrArgumentInOptIn : KtFirDiagnostic() { + override val diagnosticClass get() = OptInMarkerCanOnlyBeUsedAsAnnotationOrArgumentInOptIn::class } - abstract class UseExperimentalWithoutArguments : KtFirDiagnostic() { - override val diagnosticClass get() = UseExperimentalWithoutArguments::class + abstract class OptInWithoutArguments : KtFirDiagnostic() { + override val diagnosticClass get() = OptInWithoutArguments::class } - abstract class UseExperimentalArgumentIsNotMarker : KtFirDiagnostic() { - override val diagnosticClass get() = UseExperimentalArgumentIsNotMarker::class + abstract class OptInArgumentIsNotMarker : KtFirDiagnostic() { + override val diagnosticClass get() = OptInArgumentIsNotMarker::class abstract val notMarkerFqName: FqName } - abstract class ExperimentalAnnotationWithWrongTarget : KtFirDiagnostic() { - override val diagnosticClass get() = ExperimentalAnnotationWithWrongTarget::class + abstract class OptInMarkerWithWrongTarget : KtFirDiagnostic() { + override val diagnosticClass get() = OptInMarkerWithWrongTarget::class abstract val target: String } - abstract class ExperimentalAnnotationWithWrongRetention : KtFirDiagnostic() { - override val diagnosticClass get() = ExperimentalAnnotationWithWrongRetention::class + abstract class OptInMarkerWithWrongRetention : KtFirDiagnostic() { + override val diagnosticClass get() = OptInMarkerWithWrongRetention::class } abstract class ExposedTypealiasExpandedType : KtFirDiagnostic() { diff --git a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnosticsImpl.kt b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnosticsImpl.kt index 62481d3ed33..a4b5a58a317 100644 --- a/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnosticsImpl.kt +++ b/idea/idea-frontend-fir/src/org/jetbrains/kotlin/idea/frontend/api/fir/diagnostics/KtFirDiagnosticsImpl.kt @@ -1005,90 +1005,90 @@ internal class RepeatedAnnotationWarningImpl( override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic) } -internal class ExperimentalApiUsageImpl( +internal class OptInUsageImpl( override val optInMarkerFqName: FqName, override val message: String, firDiagnostic: FirPsiDiagnostic, override val token: ValidityToken, -) : KtFirDiagnostic.ExperimentalApiUsage(), KtAbstractFirDiagnostic { +) : KtFirDiagnostic.OptInUsage(), KtAbstractFirDiagnostic { override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic) } -internal class ExperimentalApiUsageErrorImpl( +internal class OptInUsageErrorImpl( override val optInMarkerFqName: FqName, override val message: String, firDiagnostic: FirPsiDiagnostic, override val token: ValidityToken, -) : KtFirDiagnostic.ExperimentalApiUsageError(), KtAbstractFirDiagnostic { +) : KtFirDiagnostic.OptInUsageError(), KtAbstractFirDiagnostic { override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic) } -internal class ExperimentalOverrideImpl( +internal class OptInOverrideImpl( override val optInMarkerFqName: FqName, override val message: String, firDiagnostic: FirPsiDiagnostic, override val token: ValidityToken, -) : KtFirDiagnostic.ExperimentalOverride(), KtAbstractFirDiagnostic { +) : KtFirDiagnostic.OptInOverride(), KtAbstractFirDiagnostic { override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic) } -internal class ExperimentalOverrideErrorImpl( +internal class OptInOverrideErrorImpl( override val optInMarkerFqName: FqName, override val message: String, firDiagnostic: FirPsiDiagnostic, override val token: ValidityToken, -) : KtFirDiagnostic.ExperimentalOverrideError(), KtAbstractFirDiagnostic { +) : KtFirDiagnostic.OptInOverrideError(), KtAbstractFirDiagnostic { override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic) } -internal class ExperimentalIsNotEnabledImpl( +internal class OptInIsNotEnabledImpl( firDiagnostic: FirPsiDiagnostic, override val token: ValidityToken, -) : KtFirDiagnostic.ExperimentalIsNotEnabled(), KtAbstractFirDiagnostic { +) : KtFirDiagnostic.OptInIsNotEnabled(), KtAbstractFirDiagnostic { override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic) } -internal class ExperimentalCanOnlyBeUsedAsAnnotationImpl( +internal class OptInCanOnlyBeUsedAsAnnotationImpl( firDiagnostic: FirPsiDiagnostic, override val token: ValidityToken, -) : KtFirDiagnostic.ExperimentalCanOnlyBeUsedAsAnnotation(), KtAbstractFirDiagnostic { +) : KtFirDiagnostic.OptInCanOnlyBeUsedAsAnnotation(), KtAbstractFirDiagnostic { override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic) } -internal class ExperimentalMarkerCanOnlyBeUsedAsAnnotationOrArgumentInUseExperimentalImpl( +internal class OptInMarkerCanOnlyBeUsedAsAnnotationOrArgumentInOptInImpl( firDiagnostic: FirPsiDiagnostic, override val token: ValidityToken, -) : KtFirDiagnostic.ExperimentalMarkerCanOnlyBeUsedAsAnnotationOrArgumentInUseExperimental(), KtAbstractFirDiagnostic { +) : KtFirDiagnostic.OptInMarkerCanOnlyBeUsedAsAnnotationOrArgumentInOptIn(), KtAbstractFirDiagnostic { override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic) } -internal class UseExperimentalWithoutArgumentsImpl( +internal class OptInWithoutArgumentsImpl( firDiagnostic: FirPsiDiagnostic, override val token: ValidityToken, -) : KtFirDiagnostic.UseExperimentalWithoutArguments(), KtAbstractFirDiagnostic { +) : KtFirDiagnostic.OptInWithoutArguments(), KtAbstractFirDiagnostic { override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic) } -internal class UseExperimentalArgumentIsNotMarkerImpl( +internal class OptInArgumentIsNotMarkerImpl( override val notMarkerFqName: FqName, firDiagnostic: FirPsiDiagnostic, override val token: ValidityToken, -) : KtFirDiagnostic.UseExperimentalArgumentIsNotMarker(), KtAbstractFirDiagnostic { +) : KtFirDiagnostic.OptInArgumentIsNotMarker(), KtAbstractFirDiagnostic { override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic) } -internal class ExperimentalAnnotationWithWrongTargetImpl( +internal class OptInMarkerWithWrongTargetImpl( override val target: String, firDiagnostic: FirPsiDiagnostic, override val token: ValidityToken, -) : KtFirDiagnostic.ExperimentalAnnotationWithWrongTarget(), KtAbstractFirDiagnostic { +) : KtFirDiagnostic.OptInMarkerWithWrongTarget(), KtAbstractFirDiagnostic { override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic) } -internal class ExperimentalAnnotationWithWrongRetentionImpl( +internal class OptInMarkerWithWrongRetentionImpl( firDiagnostic: FirPsiDiagnostic, override val token: ValidityToken, -) : KtFirDiagnostic.ExperimentalAnnotationWithWrongRetention(), KtAbstractFirDiagnostic { +) : KtFirDiagnostic.OptInMarkerWithWrongRetention(), KtAbstractFirDiagnostic { override val firDiagnostic: FirPsiDiagnostic by weakRef(firDiagnostic) } diff --git a/jps-plugin/testData/incremental/multiModule/multiplatform/custom/commonSourcesCompilerArg/c_a.kt b/jps-plugin/testData/incremental/multiModule/multiplatform/custom/commonSourcesCompilerArg/c_a.kt index 539712551e8..51616322ecf 100644 --- a/jps-plugin/testData/incremental/multiModule/multiplatform/custom/commonSourcesCompilerArg/c_a.kt +++ b/jps-plugin/testData/incremental/multiModule/multiplatform/custom/commonSourcesCompilerArg/c_a.kt @@ -1,4 +1,4 @@ -@file:Suppress("EXPERIMENTAL_API_USAGE_ERROR") +@file:Suppress("OPT_IN_USAGE_ERROR") @OptionalExpectation expect annotation class Optional(val value: String) diff --git a/kotlin-native/backend.native/tests/codegen/mpp/mpp_optional_expectation.kt b/kotlin-native/backend.native/tests/codegen/mpp/mpp_optional_expectation.kt index 42ff5550055..be22936309c 100644 --- a/kotlin-native/backend.native/tests/codegen/mpp/mpp_optional_expectation.kt +++ b/kotlin-native/backend.native/tests/codegen/mpp/mpp_optional_expectation.kt @@ -1,4 +1,4 @@ -@file:Suppress("EXPERIMENTAL_API_USAGE_ERROR") +@file:Suppress("OPT_IN_USAGE_ERROR") import kotlin.js.* diff --git a/kotlin-native/backend.native/tests/interop/cpp/skia.kt b/kotlin-native/backend.native/tests/interop/cpp/skia.kt index 81a073760d3..747fad08b97 100644 --- a/kotlin-native/backend.native/tests/interop/cpp/skia.kt +++ b/kotlin-native/backend.native/tests/interop/cpp/skia.kt @@ -1,4 +1,4 @@ -@file:Suppress("EXPERIMENTAL_API_USAGE_ERROR") +@file:Suppress("OPT_IN_USAGE_ERROR") import kotlinx.cinterop.* import kotlin.test.* diff --git a/kotlin-native/backend.native/tests/interop/cpp/skiaSignature.kt b/kotlin-native/backend.native/tests/interop/cpp/skiaSignature.kt index b2978d1d645..426e0d54436 100644 --- a/kotlin-native/backend.native/tests/interop/cpp/skiaSignature.kt +++ b/kotlin-native/backend.native/tests/interop/cpp/skiaSignature.kt @@ -1,4 +1,4 @@ -@file:Suppress("EXPERIMENTAL_API_USAGE_ERROR") +@file:Suppress("OPT_IN_USAGE_ERROR") import kotlinx.cinterop.* import kotlin.test.* diff --git a/kotlin-native/tools/kotlin-native-gradle-plugin/src/test/groovy/org/jetbrains/kotlin/gradle/plugin/test/MultiplatformSpecification.groovy b/kotlin-native/tools/kotlin-native-gradle-plugin/src/test/groovy/org/jetbrains/kotlin/gradle/plugin/test/MultiplatformSpecification.groovy index b113c003282..b5069a5e64d 100644 --- a/kotlin-native/tools/kotlin-native-gradle-plugin/src/test/groovy/org/jetbrains/kotlin/gradle/plugin/test/MultiplatformSpecification.groovy +++ b/kotlin-native/tools/kotlin-native-gradle-plugin/src/test/groovy/org/jetbrains/kotlin/gradle/plugin/test/MultiplatformSpecification.groovy @@ -87,7 +87,7 @@ class MultiplatformSpecification extends BaseKonanSpecification { ["src", "main", "kotlin"], "common.kt", """\ - @file:Suppress("EXPERIMENTAL_API_USAGE_ERROR") + @file:Suppress("OPT_IN_USAGE_ERROR") @OptionalExpectation expect annotation class Optional() diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/NewMultiplatformIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/NewMultiplatformIT.kt index b7e00f2f8c2..1b5c4c30127 100644 --- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/NewMultiplatformIT.kt +++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/NewMultiplatformIT.kt @@ -1088,7 +1088,7 @@ class NewMultiplatformIT : BaseGradleIT() { fun testOptionalExpectations() = with(transformNativeTestProject("new-mpp-lib-with-tests", gradleVersion)) { projectDir.resolve("src/commonMain/kotlin/Optional.kt").writeText( """ - @file:Suppress("EXPERIMENTAL_API_USAGE_ERROR") + @file:Suppress("OPT_IN_USAGE_ERROR", "EXPERIMENTAL_API_USAGE_ERROR") @OptionalExpectation expect annotation class Optional(val value: String) diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/LazyRecursionBug.kt b/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/LazyRecursionBug.kt index 36c4e55b8bb..ed8ebc080b7 100644 --- a/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/LazyRecursionBug.kt +++ b/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/LazyRecursionBug.kt @@ -1,5 +1,5 @@ // This test enshures that analysis ends up without compiler exceptions -// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE +// !DIAGNOSTICS: -OPT_IN_USAGE import kotlinx.serialization.* diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/LocalAndAnonymous.kt b/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/LocalAndAnonymous.kt index f5b97b04aa0..16ef955b6fb 100644 --- a/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/LocalAndAnonymous.kt +++ b/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/LocalAndAnonymous.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE,-EXPERIMENTAL_API_USAGE_ERROR,-EXPERIMENTAL_API_USAGE +// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE,-OPT_IN_USAGE_ERROR,-OPT_IN_USAGE // WITH_RUNTIME // SKIP_TXT diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/SerializerTypeCompatibleForSpecials.kt b/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/SerializerTypeCompatibleForSpecials.kt index 411fb0b81a6..24299212eec 100644 --- a/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/SerializerTypeCompatibleForSpecials.kt +++ b/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/SerializerTypeCompatibleForSpecials.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE +// !DIAGNOSTICS: -OPT_IN_USAGE // WITH_RUNTIME // SKIP_TXT diff --git a/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/SerializerTypeIncompatible.kt b/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/SerializerTypeIncompatible.kt index be69e658592..2c0e133abf8 100644 --- a/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/SerializerTypeIncompatible.kt +++ b/plugins/kotlin-serialization/kotlin-serialization-compiler/testData/diagnostics/SerializerTypeIncompatible.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -EXPERIMENTAL_API_USAGE +// !DIAGNOSTICS: -OPT_IN_USAGE // WITH_RUNTIME // SKIP_TXT