Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
override fun visitTypeArgument(typeArgument: KSTypeArgument, data: Unit) {
when (val variance: Variance = typeArgument.variance) {
STAR -> {
file += "*"
return
}
COVARIANT, CONTRAVARIANT -> {
file += variance.label // 'out' or 'in'
file += " "
}
INVARIANT -> {
// do nothing
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment