Drop deprecated builtins: PropertyMetadata, progression internal utils, HiddenDeclaration and Extension annotations

This commit is contained in:
Ilya Gorbunov
2016-01-20 18:31:08 +03:00
parent 31ec7bcbea
commit 2a125ca92d
6 changed files with 1 additions and 95 deletions
-16
View File
@@ -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
*/
@@ -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
}
@@ -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);
}
}
@@ -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
@@ -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<out R> : KCallable<R>, PropertyMetadata {
public interface KProperty<out R> : KCallable<R> {
/** The getter of this property, used to obtain the value of the property. */
public val getter: Getter<R>
@@ -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