[FIR] Improve constraint errors rendering in html dump

This commit is contained in:
simon.ogorodnik
2020-03-31 21:46:20 +03:00
parent 2c8a9bf437
commit 42a48ef312
3 changed files with 13 additions and 4 deletions
@@ -43,6 +43,10 @@ body.dark {
text-decoration-color: red;
}
.dark .subtype-error {
color: red;
}
.dark .error.unsupported {
text-decoration-color: cyan;
}
@@ -37,6 +37,10 @@
text-decoration-color: red;
}
.white .subtype-error {
color: red;
}
.white .error.unsupported {
text-decoration-color: cyan;
}
@@ -1221,11 +1221,12 @@ class HtmlFirDump internal constructor(private var linkResolver: FirLinkResolver
when (callDiagnostic) {
is NewConstraintError -> {
ident()
+"Lower: "
generate(callDiagnostic.lowerType as ConeKotlinType)
br
ident()
+"Upper: "
ws
span(classes = "subtype-error") { +"<:" }
ws
generate(callDiagnostic.upperType as ConeKotlinType)
}
else -> {