migrate KmValueParameter.type (KmType? -> lateinit KmType)

This commit is contained in:
Starlight220
2021-09-29 17:41:13 +03:00
committed by Alexander Udalov
parent 5690a9f21b
commit e77f72071d
3 changed files with 4 additions and 3 deletions
@@ -3,6 +3,7 @@
## Next
- 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
@@ -586,7 +586,7 @@ class KmValueParameter(
/**
* 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.
@@ -611,7 +611,7 @@ class KmValueParameter(
* @param visitor the visitor which will visit data in this value parameter
*/
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) }
extensions.forEach { visitor.visitExtensions(it.type)?.let(it::accept) }
visitor.visitEnd()