Minor. Pull user-data related things to CallableDescriptor

Currently, we assume user data for all non-FunctionDescriptor
declarations is empty
This commit is contained in:
Denis Zharkov
2018-08-30 12:47:42 +03:00
parent c1cc722ac4
commit 9cb8a35275
19 changed files with 52 additions and 25 deletions
@@ -80,6 +80,8 @@ abstract class WrappedCallableDescriptor<T : IrDeclaration>(
override fun acceptVoid(visitor: DeclarationDescriptorVisitor<Void, Void>?) {
TODO("not implemented")
}
override fun <V : Any?> getUserData(key: CallableDescriptor.UserDataKey<V>?): V? = null
}
open class WrappedValueParameterDescriptor(
@@ -289,7 +291,7 @@ open class WrappedSimpleFunctionDescriptor(
override fun getInitialSignatureDescriptor() = null
override fun <V : Any?> getUserData(key: FunctionDescriptor.UserDataKey<V>?): V? = null
override fun <V : Any?> getUserData(key: CallableDescriptor.UserDataKey<V>?): V? = null
override fun newCopyBuilder(): FunctionDescriptor.CopyBuilder<out SimpleFunctionDescriptor> {
TODO("not implemented")
@@ -378,7 +380,7 @@ open class WrappedClassConstructorDescriptor(
override fun isSuspend() = false
override fun <V : Any?> getUserData(key: FunctionDescriptor.UserDataKey<V>?): V? = null
override fun <V : Any?> getUserData(key: CallableDescriptor.UserDataKey<V>?): V? = null
override fun isExternal() = owner.isExternal
@@ -586,4 +588,6 @@ open class WrappedPropertyDescriptor(
override fun getDelegateField(): FieldDescriptor? {
TODO("not implemented")
}
override fun <V : Any?> getUserData(key: CallableDescriptor.UserDataKey<V>?): V? = null
}