Change rendering for definitely non-nullable types from T!! to T & Any

^KT-26245 In Progress
This commit is contained in:
Denis.Zharkov
2021-08-09 13:18:33 +03:00
committed by teamcityserver
parent 9e6af52e1f
commit dc79d8641b
4 changed files with 4 additions and 5 deletions
@@ -13,7 +13,7 @@ fun ConeKotlinType.render(): String {
val nullabilitySuffix = if (this !is ConeFlexibleType && this !is ConeClassErrorType) nullability.suffix else ""
return when (this) {
is ConeTypeVariableType -> "${renderAttributes()}TypeVariable(${this.lookupTag.name})"
is ConeDefinitelyNotNullType -> "${original.render()}!!"
is ConeDefinitelyNotNullType -> "${original.render()} & Any"
is ConeClassErrorType -> "${renderAttributes()}ERROR CLASS: ${diagnostic.reason}"
is ConeCapturedType -> "${renderAttributes()}CapturedType(${constructor.projection.render()})"
is ConeClassLikeType -> {
@@ -853,7 +853,7 @@ class HtmlFirDump internal constructor(private var linkResolver: FirLinkResolver
is ConeCapturedType -> inlineUnsupported(type)
is ConeDefinitelyNotNullType -> resolved {
generate(type.original)
+"!!"
+" & Any"
}
is ConeIntersectionType -> resolved { generate(type) }
is ConeIntegerLiteralType -> inlineUnsupported(type)