diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/ReflectionAPICallChecker.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/ReflectionAPICallChecker.kt index b19c8c541af..b331f46a06d 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/ReflectionAPICallChecker.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/resolve/jvm/checkers/ReflectionAPICallChecker.kt @@ -28,7 +28,7 @@ import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall import org.jetbrains.kotlin.resolve.jvm.diagnostics.ErrorsJvm.NO_REFLECTION_IN_CLASS_PATH import org.jetbrains.kotlin.serialization.deserialization.findClassAcrossModuleDependencies import org.jetbrains.kotlin.storage.StorageManager -import org.jetbrains.kotlin.storage.get +import org.jetbrains.kotlin.storage.getValue import org.jetbrains.kotlin.util.OperatorNameConventions /** diff --git a/compiler/frontend/src/org/jetbrains/kotlin/descriptors/annotations/AnnotationSplitter.kt b/compiler/frontend/src/org/jetbrains/kotlin/descriptors/annotations/AnnotationSplitter.kt index 8860078dee4..2d1a0be80f7 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/descriptors/annotations/AnnotationSplitter.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/descriptors/annotations/AnnotationSplitter.kt @@ -22,7 +22,7 @@ import org.jetbrains.kotlin.descriptors.annotations.AnnotationUseSiteTarget.* import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.storage.StorageManager -import org.jetbrains.kotlin.storage.get +import org.jetbrains.kotlin.storage.getValue /* This class lazily splits Annotations into several different Annotations according to declaration site target priority on property. diff --git a/compiler/frontend/src/org/jetbrains/kotlin/psi/userDataUtil.kt b/compiler/frontend/src/org/jetbrains/kotlin/psi/userDataUtil.kt index e38e07e5840..6adfca6c519 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/psi/userDataUtil.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/psi/userDataUtil.kt @@ -22,9 +22,6 @@ import com.intellij.openapi.util.UserDataHolder import com.intellij.psi.PsiElement public class UserDataProperty(val key: Key, val default: T? = null) { - fun get(thisRef: R, desc: kotlin.PropertyMetadata) = getValue(thisRef, desc) - fun set(thisRef: R, desc: kotlin.PropertyMetadata, value: T?) = setValue(thisRef, desc, value) - fun getValue(thisRef: R, desc: kotlin.PropertyMetadata): T? { return thisRef.getUserData(key) } @@ -35,9 +32,6 @@ public class UserDataProperty(val key: Key, va } public class NotNullableUserDataProperty(val key: Key, val defaultValue: T) { - fun get(thisRef: R, desc: kotlin.PropertyMetadata) = getValue(thisRef, desc) - fun set(thisRef: R, desc: kotlin.PropertyMetadata, value: T) = setValue(thisRef, desc, value) - fun getValue(thisRef: R, desc: kotlin.PropertyMetadata): T { return thisRef.getUserData(key) ?: defaultValue } @@ -48,9 +42,6 @@ public class NotNullableUserDataProperty(val key: } public class CopyableUserDataProperty(val key: Key, val default: T? = null) { - fun get(thisRef: R, desc: kotlin.PropertyMetadata) = getValue(thisRef, desc) - fun set(thisRef: R, desc: kotlin.PropertyMetadata, value: T?) = setValue(thisRef, desc, value) - fun getValue(thisRef: R, property: PropertyMetadata): T? { return thisRef.getCopyableUserData(key) } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/FileScopeProviderImpl.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/FileScopeProviderImpl.kt index 9e1a7198974..911837959d8 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/FileScopeProviderImpl.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/lazy/FileScopeProviderImpl.kt @@ -26,7 +26,7 @@ import org.jetbrains.kotlin.resolve.* import org.jetbrains.kotlin.resolve.bindingContextUtil.recordScope import org.jetbrains.kotlin.resolve.scopes.JetScope import org.jetbrains.kotlin.storage.StorageManager -import org.jetbrains.kotlin.storage.get +import org.jetbrains.kotlin.storage.getValue import org.jetbrains.kotlin.utils.sure import java.util.* diff --git a/compiler/util/src/org/jetbrains/kotlin/utils/CachedValueProperty.kt b/compiler/util/src/org/jetbrains/kotlin/utils/CachedValueProperty.kt index a006cf5a472..a0f01ef9d5e 100644 --- a/compiler/util/src/org/jetbrains/kotlin/utils/CachedValueProperty.kt +++ b/compiler/util/src/org/jetbrains/kotlin/utils/CachedValueProperty.kt @@ -25,7 +25,7 @@ public class CachedValueProperty( private var value: TValue? = null private var timestamp: TTimestamp? = null - public override fun get(thisRef: Any?, desc: PropertyMetadata): TValue { + public override fun getValue(thisRef: Any?, desc: PropertyMetadata): TValue { val currentTimestamp = timestampCalculator() if (value == null || timestamp != currentTimestamp) { value = calculator() diff --git a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaPackageFragment.kt b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaPackageFragment.kt index f49fd5d1365..474d62b4bcf 100644 --- a/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaPackageFragment.kt +++ b/core/descriptor.loader.java/src/org/jetbrains/kotlin/load/java/lazy/descriptors/LazyJavaPackageFragment.kt @@ -24,7 +24,6 @@ import org.jetbrains.kotlin.load.java.structure.JavaPackage import org.jetbrains.kotlin.load.kotlin.KotlinJvmBinarySourceElement import org.jetbrains.kotlin.load.kotlin.PackageClassUtils import org.jetbrains.kotlin.storage.getValue -import org.jetbrains.kotlin.storage.get class LazyJavaPackageFragment( private val c: LazyJavaResolverContext, diff --git a/core/descriptors/src/org/jetbrains/kotlin/builtins/ReflectionTypes.kt b/core/descriptors/src/org/jetbrains/kotlin/builtins/ReflectionTypes.kt index 8d0aae0a06a..7c21bcf99a2 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/builtins/ReflectionTypes.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/builtins/ReflectionTypes.kt @@ -43,7 +43,6 @@ public class ReflectionTypes(private val module: ModuleDescriptor) { } private object ClassLookup { - fun get(types: ReflectionTypes, property: PropertyMetadata) = getValue(types, property) fun getValue(types: ReflectionTypes, property: PropertyMetadata): ClassDescriptor { return types.find(property.name.capitalize()) } diff --git a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/LazyPackageViewDescriptorImpl.kt b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/LazyPackageViewDescriptorImpl.kt index e5ed542db6e..2292398f3f5 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/LazyPackageViewDescriptorImpl.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/descriptors/impl/LazyPackageViewDescriptorImpl.kt @@ -27,7 +27,6 @@ import org.jetbrains.kotlin.resolve.scopes.JetScope import org.jetbrains.kotlin.resolve.scopes.LazyScopeAdapter import org.jetbrains.kotlin.storage.StorageManager import org.jetbrains.kotlin.storage.getValue -import org.jetbrains.kotlin.storage.get import org.jetbrains.kotlin.types.TypeSubstitutor public class LazyPackageViewDescriptorImpl( diff --git a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererOptionsImpl.kt b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererOptionsImpl.kt index e6ea6bf70d4..ee8c954ce12 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererOptionsImpl.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/renderer/DescriptorRendererOptionsImpl.kt @@ -40,7 +40,7 @@ internal class DescriptorRendererOptionsImpl : DescriptorRendererOptions { if (field.getModifiers().and(Modifier.STATIC) != 0) continue field.setAccessible(true) val property = field.get(this) as? ObservableProperty<*> ?: continue - val value = property.get(this, PropertyMetadataImpl("")/* not used*/) + val value = property.getValue(this, PropertyMetadataImpl("")/* not used*/) field.set(copy, copy.property(value as Any)) } diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/DeserializedPackageFragment.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/DeserializedPackageFragment.kt index e1690258d51..cd4ec3c5bb7 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/DeserializedPackageFragment.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/DeserializedPackageFragment.kt @@ -25,7 +25,6 @@ import org.jetbrains.kotlin.serialization.SerializedResourcePaths import org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedPackageMemberScope import org.jetbrains.kotlin.storage.StorageManager import org.jetbrains.kotlin.storage.getValue -import org.jetbrains.kotlin.storage.get import java.io.InputStream import javax.inject.Inject import kotlin.properties.Delegates diff --git a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPackageMemberScope.kt b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPackageMemberScope.kt index 00391959159..7eb19fb524e 100644 --- a/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPackageMemberScope.kt +++ b/core/deserialization/src/org/jetbrains/kotlin/serialization/deserialization/descriptors/DeserializedPackageMemberScope.kt @@ -30,7 +30,6 @@ import org.jetbrains.kotlin.serialization.ProtoBuf import org.jetbrains.kotlin.serialization.deserialization.DeserializationComponents import org.jetbrains.kotlin.serialization.deserialization.NameResolver import org.jetbrains.kotlin.storage.getValue -import org.jetbrains.kotlin.storage.get import org.jetbrains.kotlin.utils.addIfNotNull public open class DeserializedPackageMemberScope( diff --git a/core/util.runtime/src/org/jetbrains/kotlin/storage/storage.kt b/core/util.runtime/src/org/jetbrains/kotlin/storage/storage.kt index feb1fe60c1f..ab558007706 100644 --- a/core/util.runtime/src/org/jetbrains/kotlin/storage/storage.kt +++ b/core/util.runtime/src/org/jetbrains/kotlin/storage/storage.kt @@ -32,10 +32,6 @@ public interface NullableLazyValue : Function0 { public fun isComputed(): Boolean } -public fun NotNullLazyValue.get(_this: Any?, p: PropertyMetadata): T = invoke() - -public fun NullableLazyValue.get(_this: Any?, p: PropertyMetadata): T? = invoke() - public fun NotNullLazyValue.getValue(_this: Any?, p: PropertyMetadata): T = invoke() public fun NullableLazyValue.getValue(_this: Any?, p: PropertyMetadata): T? = invoke() diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberValDelegateRuntime.kt b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberValDelegateRuntime.kt index d3423195d9b..801c0207c05 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberValDelegateRuntime.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberValDelegateRuntime.kt @@ -1,4 +1,5 @@ // "Create class 'Foo'" "true" +// ERROR: Class 'Foo' must be declared abstract or implement abstract member
public abstract fun getValue(thisRef: A<T>, property: kotlin.PropertyMetadata): B defined in kotlin.properties.ReadOnlyProperty open class B diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberValDelegateRuntime.kt.after b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberValDelegateRuntime.kt.after index 057481cfe5c..aae6dc72503 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberValDelegateRuntime.kt.after +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callInMemberValDelegateRuntime.kt.after @@ -1,6 +1,7 @@ import kotlin.properties.ReadOnlyProperty // "Create class 'Foo'" "true" +// ERROR: Class 'Foo' must be declared abstract or implement abstract member
public abstract fun getValue(thisRef: A<T>, property: kotlin.PropertyMetadata): B defined in kotlin.properties.ReadOnlyProperty open class B diff --git a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaQualifierInMemberValDelegate.after.Dependency.java b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaQualifierInMemberValDelegate.after.Dependency.java index 80b798de288..6d2bfab3862 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaQualifierInMemberValDelegate.after.Dependency.java +++ b/idea/testData/quickfix/createFromUsage/createClass/callExpression/callWithJavaQualifierInMemberValDelegate.after.Dependency.java @@ -1,5 +1,3 @@ -import kotlin.Deprecated; -import kotlin.PropertyMetadata; import kotlin.properties.ReadOnlyProperty; import org.jetbrains.annotations.NotNull; @@ -8,16 +6,5 @@ class J { public static class Foo implements ReadOnlyProperty, B> { public Foo(T t, @NotNull String s) { } - - @NotNull - @Deprecated - public B get(@NotNull A thisRef, @NotNull PropertyMetadata property) { - return null; - } - - @NotNull - public B getValue(@NotNull A thisRef, @NotNull PropertyMetadata property) { - return null; - } } } \ No newline at end of file diff --git a/js/js.dart-ast/src/com/google/dart/compiler/backend/js/ast/metadata/MetadataProperty.kt b/js/js.dart-ast/src/com/google/dart/compiler/backend/js/ast/metadata/MetadataProperty.kt index e0ea8e7350a..9de093654dd 100644 --- a/js/js.dart-ast/src/com/google/dart/compiler/backend/js/ast/metadata/MetadataProperty.kt +++ b/js/js.dart-ast/src/com/google/dart/compiler/backend/js/ast/metadata/MetadataProperty.kt @@ -17,9 +17,6 @@ package com.google.dart.compiler.backend.js.ast.metadata internal class MetadataProperty(val default: R) { - fun get(thisRef: T, desc: kotlin.PropertyMetadata) = getValue(thisRef, desc) - fun set(thisRef: T, desc: kotlin.PropertyMetadata, value: R) = setValue(thisRef, desc, value) - fun getValue(thisRef: T, desc: PropertyMetadata): R { if (!thisRef.hasData(desc.name)) return default return thisRef.getData(desc.name) diff --git a/libraries/stdlib/src/kotlin/properties/Delegation.kt b/libraries/stdlib/src/kotlin/properties/Delegation.kt index 6e0dd3e0daa..24f4f3e2fd7 100644 --- a/libraries/stdlib/src/kotlin/properties/Delegation.kt +++ b/libraries/stdlib/src/kotlin/properties/Delegation.kt @@ -260,8 +260,6 @@ public abstract class MapVar() : MapVal(), ReadWriteProperty.getValue(thisRef, property) } diff --git a/libraries/stdlib/src/kotlin/properties/Interfaces.kt b/libraries/stdlib/src/kotlin/properties/Interfaces.kt index 518c8f220a9..ee83fcb6988 100644 --- a/libraries/stdlib/src/kotlin/properties/Interfaces.kt +++ b/libraries/stdlib/src/kotlin/properties/Interfaces.kt @@ -17,11 +17,7 @@ public interface ReadOnlyProperty { * @param property the metadata for the property. * @return the property value. */ - public fun getValue(thisRef: R, property: PropertyMetadata): T = get(thisRef, property) - - //TODO drop after bootstrap - @Deprecated("Use getValue() instead.", ReplaceWith("getValue(thisRef, property)")) - public fun get(thisRef: R, property: PropertyMetadata): T = getValue(thisRef, property) + public fun getValue(thisRef: R, property: PropertyMetadata): T } /** @@ -40,11 +36,7 @@ public interface ReadWriteProperty { * @param property the metadata for the property. * @return the property value. */ - public fun getValue(thisRef: R, property: PropertyMetadata): T = get(thisRef, property) - - //TODO drop after bootstrap - @Deprecated("Use getValue() instead.", ReplaceWith("getValue(thisRef, property)")) - public fun get(thisRef: R, property: PropertyMetadata): T = getValue(thisRef, property) + public fun getValue(thisRef: R, property: PropertyMetadata): T /** * Sets the value of the property for the given object. @@ -52,11 +44,5 @@ public interface ReadWriteProperty { * @param property the metadata for the property. * @param value the value to set. */ - public fun setValue(thisRef: R, property: PropertyMetadata, value: T) { - set(thisRef, property, value) - } - - //TODO drop after bootstrap - @Deprecated("Use setValue() instead.", ReplaceWith("setValue(thisRef, property, value)")) - public fun set(thisRef: R, property: PropertyMetadata, value: T) = setValue(thisRef, property, value) + public fun setValue(thisRef: R, property: PropertyMetadata, value: T) } diff --git a/libraries/stdlib/src/kotlin/properties/MapAccessors.kt b/libraries/stdlib/src/kotlin/properties/MapAccessors.kt index 591617cb847..2fa8ce13766 100644 --- a/libraries/stdlib/src/kotlin/properties/MapAccessors.kt +++ b/libraries/stdlib/src/kotlin/properties/MapAccessors.kt @@ -13,9 +13,6 @@ package kotlin.properties */ public fun Map.getValue(thisRef: Any?, property: PropertyMetadata): V = getOrImplicitDefault(property.name) as V -@Deprecated("Use getValue() instead") -public fun Map.get(thisRef: Any?, property: PropertyMetadata): V = getOrImplicitDefault(property.name) as V - /** * Returns the value of the property for the given object from this mutable map. * @param thisRef the object for which the value is requested (not used). @@ -27,10 +24,6 @@ public fun Map.get(thisRef: Any?, property: PropertyMetadata): @kotlin.jvm.JvmName("getVar") public fun MutableMap.getValue(thisRef: Any?, property: PropertyMetadata): V = getOrImplicitDefault(property.name) as V -@Deprecated("Use getValue() instead") -@kotlin.jvm.JvmName("getVarDeprecated") -public fun MutableMap.get(thisRef: Any?, property: PropertyMetadata): V = getOrImplicitDefault(property.name) as V - /** * Stores the value of the property for the given object in this mutable map. * @param thisRef the object for which the value is requested (not used). @@ -39,9 +32,4 @@ public fun MutableMap.get(thisRef: Any?, property: Property */ public fun MutableMap.setValue(thisRef: Any?, property: PropertyMetadata, value: V) { this.put(property.name, value) -} - -@Deprecated("Use setValue() instead") -public fun MutableMap.set(thisRef: Any?, property: PropertyMetadata, value: V) { - this.put(property.name, value) -} +} \ No newline at end of file diff --git a/libraries/stdlib/src/kotlin/util/Lazy.kt b/libraries/stdlib/src/kotlin/util/Lazy.kt index 507c9702e83..e88428bbb6b 100644 --- a/libraries/stdlib/src/kotlin/util/Lazy.kt +++ b/libraries/stdlib/src/kotlin/util/Lazy.kt @@ -76,9 +76,6 @@ public fun lazy(lock: Any?, initializer: () -> T): Lazy = SynchronizedLazy */ public fun Lazy.getValue(thisRef: Any?, property: PropertyMetadata): T = value -@Deprecated("Use getValue() instead") -public fun Lazy.get(thisRef: Any?, property: PropertyMetadata): T = value - /** * Specifies how a [Lazy] instance synchronizes access among multiple threads. */