From 2a125ca92d12628bdbb7c2510a9da755ef6d30ab Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Wed, 20 Jan 2016 18:31:08 +0300 Subject: [PATCH] Drop deprecated builtins: PropertyMetadata, progression internal utils, HiddenDeclaration and Extension annotations --- core/builtins/src/kotlin/Annotations.kt | 16 ----------- core/builtins/src/kotlin/PropertyMetadata.kt | 22 --------------- .../src/kotlin/internal/InternalPackage.java | 28 ------------------- .../src/kotlin/internal/progressionUtil.kt | 6 ---- core/builtins/src/kotlin/reflect/KProperty.kt | 3 +- .../src/kotlin/PropertyMetadataImpl.kt | 21 -------------- 6 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 core/builtins/src/kotlin/PropertyMetadata.kt delete mode 100644 core/builtins/src/kotlin/internal/InternalPackage.java delete mode 100644 core/runtime.jvm/src/kotlin/PropertyMetadataImpl.kt diff --git a/core/builtins/src/kotlin/Annotations.kt b/core/builtins/src/kotlin/Annotations.kt index 9d913f6e976..a0cbc1c7395 100644 --- a/core/builtins/src/kotlin/Annotations.kt +++ b/core/builtins/src/kotlin/Annotations.kt @@ -71,11 +71,6 @@ public enum class DeprecationLevel { @MustBeDocumented public annotation class ExtensionFunctionType -@Target(TYPE) -@MustBeDocumented -@Deprecated("Use @ExtensionFunctionType instead.", replaceWith = ReplaceWith("@ExtensionFunctionType")) -public annotation class Extension - /** * Suppresses the given compilation warnings in the annotated element. * @property names names of the compiler diagnostics to suppress. @@ -85,17 +80,6 @@ public annotation class Extension @Retention(SOURCE) public annotation class Suppress(vararg val names: String) -/** - * Hides the annotated function, property or constructor from the overload resolution, - * thus preventing its usages from newly compiled code, but keeps compiling it - * to retain binary compatibility with the code compiled against it before. - */ -@Target(FUNCTION, PROPERTY, CONSTRUCTOR) -@Retention(BINARY) -@MustBeDocumented -@Deprecated("Use @Deprecated(\"...\", level = DeprecationLevel.HIDDEN) instead", replaceWith = ReplaceWith("@Deprecated(, level = DeprecationLevel.HIDDEN)")) -public annotation class HiddenDeclaration - /** * Suppresses errors about variance conflict */ diff --git a/core/builtins/src/kotlin/PropertyMetadata.kt b/core/builtins/src/kotlin/PropertyMetadata.kt deleted file mode 100644 index 95a8b1997e2..00000000000 --- a/core/builtins/src/kotlin/PropertyMetadata.kt +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package kotlin - -@Deprecated("Please use KProperty instead.", ReplaceWith("KProperty<*>", "kotlin.reflect.KProperty"), DeprecationLevel.ERROR) -internal interface PropertyMetadata { - val name: String -} diff --git a/core/builtins/src/kotlin/internal/InternalPackage.java b/core/builtins/src/kotlin/internal/InternalPackage.java deleted file mode 100644 index b84c4e83bbb..00000000000 --- a/core/builtins/src/kotlin/internal/InternalPackage.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package kotlin.internal; - -@Deprecated -public class InternalPackage { - public static int getProgressionFinalElement(int start, int end, int increment) { - return ProgressionUtilKt.getProgressionFinalElement(start, end, increment); - } - - public static long getProgressionFinalElement(long start, long end, long increment) { - return ProgressionUtilKt.getProgressionFinalElement(start, end, increment); - } -} diff --git a/core/builtins/src/kotlin/internal/progressionUtil.kt b/core/builtins/src/kotlin/internal/progressionUtil.kt index ad8a978eecb..026c99fb4ef 100644 --- a/core/builtins/src/kotlin/internal/progressionUtil.kt +++ b/core/builtins/src/kotlin/internal/progressionUtil.kt @@ -36,10 +36,6 @@ private fun differenceModulo(a: Long, b: Long, c: Long): Long { return mod(mod(a, c) - mod(b, c), c) } - -@Deprecated("This function supports the compiler infrastructure and is not intended to be used directly from user code. It may become internal soon.") -public fun getProgressionFinalElement(start: Int, end: Int, increment: Int): Int = getProgressionLastElement(start, end, increment) - /** * Calculates the final element of a bounded arithmetic progression, i.e. the last element of the progression which is in the range * from [start] to [end] in case of a positive [step], or from [end] to [start] in case of a negative @@ -65,8 +61,6 @@ internal fun getProgressionLastElement(start: Int, end: Int, step: Int): Int { } } -@Deprecated("This function supports the compiler infrastructure and is not intended to be used directly from user code. It may become internal soon.") -public fun getProgressionFinalElement(start: Long, end: Long, increment: Long): Long = getProgressionLastElement(start, end, increment) /** * Calculates the final element of a bounded arithmetic progression, i.e. the last element of the progression which is in the range * from [start] to [end] in case of a positive [step], or from [end] to [start] in case of a negative diff --git a/core/builtins/src/kotlin/reflect/KProperty.kt b/core/builtins/src/kotlin/reflect/KProperty.kt index 6b22e6c8746..a3c39e6a8bd 100644 --- a/core/builtins/src/kotlin/reflect/KProperty.kt +++ b/core/builtins/src/kotlin/reflect/KProperty.kt @@ -14,7 +14,6 @@ * limitations under the License. */ -@file:Suppress("DEPRECATION_ERROR", "EXPOSED_SUPER_INTERFACE", "INVISIBLE_REFERENCE", "INVISIBLE_MEMBER") // for PropertyMetadata inheritance package kotlin.reflect /** @@ -25,7 +24,7 @@ package kotlin.reflect * * @param R the type of the property. */ -public interface KProperty : KCallable, PropertyMetadata { +public interface KProperty : KCallable { /** The getter of this property, used to obtain the value of the property. */ public val getter: Getter diff --git a/core/runtime.jvm/src/kotlin/PropertyMetadataImpl.kt b/core/runtime.jvm/src/kotlin/PropertyMetadataImpl.kt deleted file mode 100644 index bd5774c5569..00000000000 --- a/core/runtime.jvm/src/kotlin/PropertyMetadataImpl.kt +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package kotlin - -@Suppress("DEPRECATION_ERROR") -@Deprecated("Please use KProperty instead.", level = DeprecationLevel.ERROR) -internal data class PropertyMetadataImpl(override val name: String) : PropertyMetadata