Have "in type" for java fields to be able to check that type in assignment positions (against rhs' type)

^KT-46727 Fixed
This commit is contained in:
Victor Petukhov
2021-09-23 18:11:50 +03:00
parent 3530840da3
commit 0cb56be14f
17 changed files with 368 additions and 2 deletions
@@ -884,6 +884,8 @@ open class IrBasedPropertyDescriptor(owner: IrProperty) :
TODO("not implemented")
}
override fun getInType(): KotlinType? = setter?.valueParameters?.get(0)?.type
override fun <V : Any?> getUserData(key: CallableDescriptor.UserDataKey<V>?): V? = null
}
@@ -1062,6 +1064,8 @@ open class IrBasedFieldDescriptor(owner: IrField) : PropertyDescriptor, IrBasedD
override fun getBackingField(): FieldDescriptor? = null // TODO
override fun getDelegateField(): FieldDescriptor? = null // TODO
override fun getInType(): KotlinType? = setter?.valueParameters?.get(0)?.type
override fun <V : Any?> getUserData(key: CallableDescriptor.UserDataKey<V>?): V? = null
}