Implement KTypeProjection.toString
The implementation is checked by tests on typeOf. #KT-30071 Fixed
This commit is contained in:
@@ -71,6 +71,13 @@ public data class KTypeProjection constructor(
|
||||
*/
|
||||
public val type: KType?
|
||||
) {
|
||||
override fun toString(): String = when (variance) {
|
||||
null -> "*"
|
||||
KVariance.INVARIANT -> type.toString()
|
||||
KVariance.IN -> "in $type"
|
||||
KVariance.OUT -> "out $type"
|
||||
}
|
||||
|
||||
public companion object {
|
||||
/**
|
||||
* Star projection, denoted by the `*` character.
|
||||
|
||||
Reference in New Issue
Block a user