migrate KmValueParameter.type (KmType? -> lateinit KmType)
This commit is contained in:
committed by
Alexander Udalov
parent
5690a9f21b
commit
e77f72071d
@@ -3,6 +3,7 @@
|
|||||||
## Next
|
## Next
|
||||||
|
|
||||||
- Add `JvmPropertyExtensionVisitor.visitSyntheticMethodForDelegate` for optimized delegated properties (KT-39055).
|
- Add `JvmPropertyExtensionVisitor.visitSyntheticMethodForDelegate` for optimized delegated properties (KT-39055).
|
||||||
|
- [`KT-48965`](https://youtrack.jetbrains.com/issue/KT-48965) Make the type of `KmValueParameter.type` non-null `KmType`
|
||||||
|
|
||||||
## 0.3.0
|
## 0.3.0
|
||||||
|
|
||||||
|
|||||||
@@ -586,7 +586,7 @@ class KmValueParameter(
|
|||||||
/**
|
/**
|
||||||
* Type of the value parameter, if this is **not** a `vararg` parameter.
|
* Type of the value parameter, if this is **not** a `vararg` parameter.
|
||||||
*/
|
*/
|
||||||
var type: KmType? = null
|
lateinit var type: KmType
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of the value parameter, if this is a `vararg` parameter.
|
* Type of the value parameter, if this is a `vararg` parameter.
|
||||||
@@ -611,7 +611,7 @@ class KmValueParameter(
|
|||||||
* @param visitor the visitor which will visit data in this value parameter
|
* @param visitor the visitor which will visit data in this value parameter
|
||||||
*/
|
*/
|
||||||
fun accept(visitor: KmValueParameterVisitor) {
|
fun accept(visitor: KmValueParameterVisitor) {
|
||||||
type?.let { visitor.visitType(it.flags)?.let(it::accept) }
|
visitor.visitType(type.flags)?.let(type::accept)
|
||||||
varargElementType?.let { visitor.visitVarargElementType(it.flags)?.let(it::accept) }
|
varargElementType?.let { visitor.visitVarargElementType(it.flags)?.let(it::accept) }
|
||||||
extensions.forEach { visitor.visitExtensions(it.type)?.let(it::accept) }
|
extensions.forEach { visitor.visitExtensions(it.type)?.let(it::accept) }
|
||||||
visitor.visitEnd()
|
visitor.visitEnd()
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ object CirDeserializers {
|
|||||||
CirValueParameter.createInterned(
|
CirValueParameter.createInterned(
|
||||||
annotations = annotations(source.flags, typeResolver, source::annotations),
|
annotations = annotations(source.flags, typeResolver, source::annotations),
|
||||||
name = CirName.create(source.name),
|
name = CirName.create(source.name),
|
||||||
returnType = type(source.type!!, typeResolver),
|
returnType = type(source.type, typeResolver),
|
||||||
varargElementType = source.varargElementType?.let { type(it, typeResolver) },
|
varargElementType = source.varargElementType?.let { type(it, typeResolver) },
|
||||||
declaresDefaultValue = Flag.ValueParameter.DECLARES_DEFAULT_VALUE(source.flags),
|
declaresDefaultValue = Flag.ValueParameter.DECLARES_DEFAULT_VALUE(source.flags),
|
||||||
isCrossinline = Flag.ValueParameter.IS_CROSSINLINE(source.flags),
|
isCrossinline = Flag.ValueParameter.IS_CROSSINLINE(source.flags),
|
||||||
|
|||||||
Reference in New Issue
Block a user