New J2K: Do not show unknown comment for some kind of type types
This commit is contained in:
committed by
Ilya Kirillov
parent
c1ed2e020c
commit
0340c218b9
@@ -641,6 +641,9 @@ class NewCodeBuilder {
|
||||
|
||||
private fun renderType(type: JKType) {
|
||||
if (type is JKNoTypeImpl) return
|
||||
if (type.nullability == Nullability.Default) {
|
||||
printer.print("/*UNDEFINED*/")
|
||||
}
|
||||
when (type) {
|
||||
is JKClassType -> printer.printWithNoIndent(type.classReference.displayName().escapedAsQualifiedName())
|
||||
is JKContextType -> return
|
||||
@@ -659,14 +662,11 @@ class NewCodeBuilder {
|
||||
}
|
||||
if (type is JKParametrizedType && type.parameters.isNotEmpty()) {
|
||||
printer.par(ANGLE) {
|
||||
renderList(type.parameters, renderElement = ::renderType)
|
||||
renderList(type.parameters, renderElement = { renderType(it) })
|
||||
}
|
||||
}
|
||||
when (type.nullability) {
|
||||
Nullability.Nullable -> printer.printWithNoIndent("?")
|
||||
Nullability.Default -> printer.printWithNoIndent("?")// /* TODO: Default */")
|
||||
else -> {
|
||||
}
|
||||
if (type.nullability == Nullability.Nullable) {
|
||||
printer.printWithNoIndent("?")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user