From 0b11d4214c1c4c1cae5a54c1502200d2e48ba926 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Fri, 23 Jul 2021 15:55:25 +0200 Subject: [PATCH] Make typeOf stable since 1.6 #KT-45396 Fixed --- compiler/testData/codegen/box/reflection/typeOf/classes.kt | 2 -- .../codegen/box/reflection/typeOf/flexibleTypes_after.kt | 2 -- .../testData/codegen/box/reflection/typeOf/inlineClasses.kt | 1 - .../codegen/box/reflection/typeOf/intersectionType.kt | 1 - .../codegen/box/reflection/typeOf/js/typeOfCapturedStar.kt | 2 -- .../codegen/box/reflection/typeOf/js/typeOfReifiedUnit.kt | 1 - .../codegen/box/reflection/typeOf/manyTypeArguments.kt | 1 - .../testData/codegen/box/reflection/typeOf/multipleLayers.kt | 1 - .../codegen/box/reflection/typeOf/mutableCollections_after.kt | 2 -- .../codegen/box/reflection/typeOf/noReflect/classes.kt | 2 -- .../box/reflection/typeOf/noReflect/flexibleTypes_after.kt | 2 -- .../codegen/box/reflection/typeOf/noReflect/inlineClasses.kt | 1 - .../reflection/typeOf/noReflect/mutableCollections_after.kt | 2 -- .../noReflect/nonReifiedTypeParameters/defaultUpperBound.kt | 1 - .../nonReifiedTypeParameters/equalsOnClassParameters.kt | 1 - .../nonReifiedTypeParameters/equalsOnFunctionParameters.kt | 1 - .../typeOf/noReflect/nonReifiedTypeParameters/innerGeneric.kt | 1 - .../nonReifiedTypeParameters/simpleClassParameter.kt | 1 - .../nonReifiedTypeParameters/simpleFunctionParameter.kt | 1 - .../nonReifiedTypeParameters/simplePropertyParameter.kt | 1 - .../noReflect/nonReifiedTypeParameters/typeParameterFlags.kt | 1 - .../upperBoundUsesOuterClassParameter.kt | 1 - .../typeOf/noReflect/nonReifiedTypeParameters/upperBounds.kt | 1 - .../codegen/box/reflection/typeOf/noReflect/nothing_after.kt | 2 -- .../box/reflection/typeOf/noReflect/primitiveJavaTypes.kt | 2 -- .../codegen/box/reflection/typeOf/noReflect/rawTypes_after.kt | 2 -- .../typeOf/noReflect/typeReferenceEqualsHashCode.kt | 2 -- .../typeOf/nonReifiedTypeParameters/defaultUpperBound.kt | 1 - .../nonReifiedTypeParameters/equalsOnClassParameters.kt | 1 - .../equalsOnClassParametersWithReflectAPI.kt | 1 - .../nonReifiedTypeParameters/equalsOnFunctionParameters.kt | 1 - .../typeOf/nonReifiedTypeParameters/innerGeneric.kt | 1 - .../nonReifiedTypeParameters/recursiveBoundWithInline.kt | 3 +-- .../nonReifiedTypeParameters/recursiveBoundWithoutInline.kt | 3 +-- .../typeOf/nonReifiedTypeParameters/simpleClassParameter.kt | 1 - .../nonReifiedTypeParameters/simpleFunctionParameter.kt | 1 - .../nonReifiedTypeParameters/simplePropertyParameter.kt | 1 - .../nonReifiedTypeParameters/starProjectionInUpperBound.kt | 1 - .../typeOf/nonReifiedTypeParameters/typeParameterFlags.kt | 1 - .../upperBoundUsesOuterClassParameter.kt | 1 - .../reflection/typeOf/nonReifiedTypeParameters/upperBounds.kt | 1 - .../testData/codegen/box/reflection/typeOf/nothing_after.kt | 2 -- .../codegen/box/reflection/typeOf/primitiveJavaTypes.kt | 2 -- .../testData/codegen/box/reflection/typeOf/rawTypes_after.kt | 2 -- .../codegen/box/reflection/typeOf/typeOfCapturedStar.kt | 2 -- libraries/stdlib/api/js-v1/kotlin.reflect.kt | 4 ++-- libraries/stdlib/api/js/kotlin.reflect.kt | 4 ++-- libraries/stdlib/src/kotlin/reflect/typeOf.kt | 4 ++-- 48 files changed, 8 insertions(+), 68 deletions(-) diff --git a/compiler/testData/codegen/box/reflection/typeOf/classes.kt b/compiler/testData/codegen/box/reflection/typeOf/classes.kt index c9c3ad1aca3..4a8fe1f6087 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/classes.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/classes.kt @@ -1,5 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi -// !LANGUAGE: +NewInference // IGNORE_BACKEND: JS, JS_IR // IGNORE_BACKEND: JS_IR_ES6 // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/typeOf/flexibleTypes_after.kt b/compiler/testData/codegen/box/reflection/typeOf/flexibleTypes_after.kt index 9b8d2ee8bf6..045220d484a 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/flexibleTypes_after.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/flexibleTypes_after.kt @@ -1,5 +1,3 @@ -// !API_VERSION: LATEST -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // IGNORE_BACKEND_FIR: JVM_IR // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/typeOf/inlineClasses.kt b/compiler/testData/codegen/box/reflection/typeOf/inlineClasses.kt index 3dfcf46a41c..d99a0ae4738 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/inlineClasses.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/inlineClasses.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // IGNORE_BACKEND: JS, JS_IR // IGNORE_BACKEND: JS_IR_ES6 // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/typeOf/intersectionType.kt b/compiler/testData/codegen/box/reflection/typeOf/intersectionType.kt index e0fb230c0f8..85bfec084a7 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/intersectionType.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/intersectionType.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // IGNORE_BACKEND: JS // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/js/typeOfCapturedStar.kt b/compiler/testData/codegen/box/reflection/typeOf/js/typeOfCapturedStar.kt index 75f033827d0..2acddfc9598 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/js/typeOfCapturedStar.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/js/typeOfCapturedStar.kt @@ -1,5 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi -// !LANGUAGE: +NewInference // TARGET_BACKEND: JS // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/js/typeOfReifiedUnit.kt b/compiler/testData/codegen/box/reflection/typeOf/js/typeOfReifiedUnit.kt index 2435abf2d23..0805b1094ca 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/js/typeOfReifiedUnit.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/js/typeOfReifiedUnit.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JS // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/manyTypeArguments.kt b/compiler/testData/codegen/box/reflection/typeOf/manyTypeArguments.kt index 3b4d53fccc3..be59397715d 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/manyTypeArguments.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/manyTypeArguments.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // IGNORE_BACKEND: JS, JS_IR // IGNORE_BACKEND: JS_IR_ES6 // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/typeOf/multipleLayers.kt b/compiler/testData/codegen/box/reflection/typeOf/multipleLayers.kt index 3ddcffb8d46..13aac26e878 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/multipleLayers.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/multipleLayers.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // IGNORE_BACKEND: JS, JS_IR // IGNORE_BACKEND: JS_IR_ES6 // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/typeOf/mutableCollections_after.kt b/compiler/testData/codegen/box/reflection/typeOf/mutableCollections_after.kt index 66d1e5a4a3c..49b53d7c5cf 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/mutableCollections_after.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/mutableCollections_after.kt @@ -1,5 +1,3 @@ -// !API_VERSION: LATEST -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/classes.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/classes.kt index b4396b20f55..57fda07daa7 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/classes.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/classes.kt @@ -1,5 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi -// !LANGUAGE: +NewInference // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/flexibleTypes_after.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/flexibleTypes_after.kt index 27b6a73508d..ee995dae532 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/flexibleTypes_after.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/flexibleTypes_after.kt @@ -1,5 +1,3 @@ -// !API_VERSION: LATEST -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: box.kt diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/inlineClasses.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/inlineClasses.kt index f2496cf375c..ab302feca3d 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/inlineClasses.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/inlineClasses.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/mutableCollections_after.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/mutableCollections_after.kt index b00ad3a2966..2d21ca3c36c 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/mutableCollections_after.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/mutableCollections_after.kt @@ -1,5 +1,3 @@ -// !API_VERSION: LATEST -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/defaultUpperBound.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/defaultUpperBound.kt index c50e949d5bc..73ec11a25cf 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/defaultUpperBound.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/defaultUpperBound.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/equalsOnClassParameters.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/equalsOnClassParameters.kt index 09814866362..c8d4305c3b4 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/equalsOnClassParameters.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/equalsOnClassParameters.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/equalsOnFunctionParameters.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/equalsOnFunctionParameters.kt index 9624259d3cb..b4f78197f11 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/equalsOnFunctionParameters.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/equalsOnFunctionParameters.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/innerGeneric.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/innerGeneric.kt index bae963c80b5..2e97fab3a64 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/innerGeneric.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/innerGeneric.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/simpleClassParameter.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/simpleClassParameter.kt index 9510f235cba..f3f827d8ac6 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/simpleClassParameter.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/simpleClassParameter.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/simpleFunctionParameter.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/simpleFunctionParameter.kt index 7fe911e8808..9a4f13c52d7 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/simpleFunctionParameter.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/simpleFunctionParameter.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/simplePropertyParameter.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/simplePropertyParameter.kt index ff2e20beae1..5dd3ad00d01 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/simplePropertyParameter.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/simplePropertyParameter.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/typeParameterFlags.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/typeParameterFlags.kt index 0be0ef84118..8aed7640bc4 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/typeParameterFlags.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/typeParameterFlags.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/upperBoundUsesOuterClassParameter.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/upperBoundUsesOuterClassParameter.kt index f433bf7d2b7..131e714d199 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/upperBoundUsesOuterClassParameter.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/upperBoundUsesOuterClassParameter.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/upperBounds.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/upperBounds.kt index ffff7739d63..5cc604f7a98 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/upperBounds.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nonReifiedTypeParameters/upperBounds.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nothing_after.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nothing_after.kt index aa2704bf331..bd92a605ddd 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/nothing_after.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/nothing_after.kt @@ -1,5 +1,3 @@ -// !API_VERSION: LATEST -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: box.kt diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/primitiveJavaTypes.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/primitiveJavaTypes.kt index 33a583db13f..6a6b0f1d632 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/primitiveJavaTypes.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/primitiveJavaTypes.kt @@ -1,5 +1,3 @@ -// !API_VERSION: LATEST -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_RUNTIME // FILE: box.kt diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/rawTypes_after.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/rawTypes_after.kt index 49ee8b9b222..302982e8eb4 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/rawTypes_after.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/rawTypes_after.kt @@ -1,5 +1,3 @@ -// !API_VERSION: LATEST -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // IGNORE_BACKEND_FIR: JVM_IR // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/noReflect/typeReferenceEqualsHashCode.kt b/compiler/testData/codegen/box/reflection/typeOf/noReflect/typeReferenceEqualsHashCode.kt index d0ce9a19059..717535fa4a0 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/noReflect/typeReferenceEqualsHashCode.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/noReflect/typeReferenceEqualsHashCode.kt @@ -1,5 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi -// !LANGUAGE: +NewInference // IGNORE_BACKEND: JS_IR_ES6 // WITH_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/defaultUpperBound.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/defaultUpperBound.kt index a29862728e0..4bd2c109c03 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/defaultUpperBound.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/defaultUpperBound.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/equalsOnClassParameters.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/equalsOnClassParameters.kt index 4c24b480927..68a43f86fb4 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/equalsOnClassParameters.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/equalsOnClassParameters.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/equalsOnClassParametersWithReflectAPI.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/equalsOnClassParametersWithReflectAPI.kt index 4f4e7da1efc..97b78f1157e 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/equalsOnClassParametersWithReflectAPI.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/equalsOnClassParametersWithReflectAPI.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/equalsOnFunctionParameters.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/equalsOnFunctionParameters.kt index 3e0c15808dd..aef868ff0a0 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/equalsOnFunctionParameters.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/equalsOnFunctionParameters.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/innerGeneric.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/innerGeneric.kt index 1d333a6345c..94cb7610ef0 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/innerGeneric.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/innerGeneric.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/recursiveBoundWithInline.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/recursiveBoundWithInline.kt index 05dc2a70845..caa9eb5805f 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/recursiveBoundWithInline.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/recursiveBoundWithInline.kt @@ -1,5 +1,4 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi -// TODO: it should target all backends, but now it's possible to have only one .fial file per test file, +// TODO: it should target all backends, but now it's possible to have only one .fail file per test file, // so we can't define different messages for different test suites/runners. // TARGET_BACKEND: JS // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/recursiveBoundWithoutInline.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/recursiveBoundWithoutInline.kt index ea49c1e1127..cba1c35fb67 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/recursiveBoundWithoutInline.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/recursiveBoundWithoutInline.kt @@ -1,5 +1,4 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi -// TODO: it should target all backends, but now it's possible to have only one .fial file per test file, +// TODO: it should target all backends, but now it's possible to have only one .fail file per test file, // so we can't define different messages for different test suites/runners. // TARGET_BACKEND: JS // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/simpleClassParameter.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/simpleClassParameter.kt index f01d03eb7a1..c9d0a9828d3 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/simpleClassParameter.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/simpleClassParameter.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/simpleFunctionParameter.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/simpleFunctionParameter.kt index 1516e5e716a..c4e1ea3e5c6 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/simpleFunctionParameter.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/simpleFunctionParameter.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/simplePropertyParameter.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/simplePropertyParameter.kt index d90fe1b7c23..7c17d256f78 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/simplePropertyParameter.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/simplePropertyParameter.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/starProjectionInUpperBound.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/starProjectionInUpperBound.kt index 494cf134cbe..a7c9e9286d1 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/starProjectionInUpperBound.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/starProjectionInUpperBound.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/typeParameterFlags.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/typeParameterFlags.kt index 436e1be2bb9..a83a644e28f 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/typeParameterFlags.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/typeParameterFlags.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/upperBoundUsesOuterClassParameter.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/upperBoundUsesOuterClassParameter.kt index 290399565d2..d9816271d6f 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/upperBoundUsesOuterClassParameter.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/upperBoundUsesOuterClassParameter.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/upperBounds.kt b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/upperBounds.kt index 6a5afbd7419..b346fddd514 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/upperBounds.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nonReifiedTypeParameters/upperBounds.kt @@ -1,4 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // WITH_REFLECT // KJS_WITH_FULL_RUNTIME diff --git a/compiler/testData/codegen/box/reflection/typeOf/nothing_after.kt b/compiler/testData/codegen/box/reflection/typeOf/nothing_after.kt index 5eb4b40ea35..95baa534a0a 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/nothing_after.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/nothing_after.kt @@ -1,5 +1,3 @@ -// !API_VERSION: LATEST -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_REFLECT // FILE: box.kt diff --git a/compiler/testData/codegen/box/reflection/typeOf/primitiveJavaTypes.kt b/compiler/testData/codegen/box/reflection/typeOf/primitiveJavaTypes.kt index 6a27d2a3f4e..0c89b5146fe 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/primitiveJavaTypes.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/primitiveJavaTypes.kt @@ -1,5 +1,3 @@ -// !API_VERSION: LATEST -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // WITH_REFLECT // FILE: box.kt diff --git a/compiler/testData/codegen/box/reflection/typeOf/rawTypes_after.kt b/compiler/testData/codegen/box/reflection/typeOf/rawTypes_after.kt index 0f07d900f86..6ef788ba19d 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/rawTypes_after.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/rawTypes_after.kt @@ -1,5 +1,3 @@ -// !API_VERSION: LATEST -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi // TARGET_BACKEND: JVM // IGNORE_BACKEND_FIR: JVM_IR // WITH_REFLECT diff --git a/compiler/testData/codegen/box/reflection/typeOf/typeOfCapturedStar.kt b/compiler/testData/codegen/box/reflection/typeOf/typeOfCapturedStar.kt index ea4e80adbe9..709ce6cf25f 100644 --- a/compiler/testData/codegen/box/reflection/typeOf/typeOfCapturedStar.kt +++ b/compiler/testData/codegen/box/reflection/typeOf/typeOfCapturedStar.kt @@ -1,5 +1,3 @@ -// !USE_EXPERIMENTAL: kotlin.ExperimentalStdlibApi -// !LANGUAGE: +NewInference // IGNORE_BACKEND: JS, JS_IR // IGNORE_BACKEND: JS_IR_ES6 // WITH_REFLECT diff --git a/libraries/stdlib/api/js-v1/kotlin.reflect.kt b/libraries/stdlib/api/js-v1/kotlin.reflect.kt index 18440f615cb..e98f62df63b 100644 --- a/libraries/stdlib/api/js-v1/kotlin.reflect.kt +++ b/libraries/stdlib/api/js-v1/kotlin.reflect.kt @@ -1,5 +1,5 @@ -@kotlin.SinceKotlin(version = "1.3") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.6") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public inline fun typeOf(): kotlin.reflect.KType @kotlin.SinceKotlin(version = "1.4") diff --git a/libraries/stdlib/api/js/kotlin.reflect.kt b/libraries/stdlib/api/js/kotlin.reflect.kt index 68d99c9bcc1..922bc18b3e8 100644 --- a/libraries/stdlib/api/js/kotlin.reflect.kt +++ b/libraries/stdlib/api/js/kotlin.reflect.kt @@ -1,5 +1,5 @@ -@kotlin.SinceKotlin(version = "1.3") -@kotlin.ExperimentalStdlibApi +@kotlin.SinceKotlin(version = "1.6") +@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalStdlibApi::class}) public inline fun typeOf(): kotlin.reflect.KType @kotlin.SinceKotlin(version = "1.4") diff --git a/libraries/stdlib/src/kotlin/reflect/typeOf.kt b/libraries/stdlib/src/kotlin/reflect/typeOf.kt index 79957c1ea27..dece8790522 100644 --- a/libraries/stdlib/src/kotlin/reflect/typeOf.kt +++ b/libraries/stdlib/src/kotlin/reflect/typeOf.kt @@ -8,7 +8,7 @@ package kotlin.reflect /** * Returns a runtime representation of the given reified type [T] as an instance of [KType]. */ -@SinceKotlin("1.3") -@ExperimentalStdlibApi +@SinceKotlin("1.6") +@WasExperimental(ExperimentalStdlibApi::class) public inline fun typeOf(): KType = throw UnsupportedOperationException("This function is implemented as an intrinsic on all supported platforms.")