K2 Tests: Add rendering of FirSmartCastExpression in html dump
Previously it was just skipped
This commit is contained in:
committed by
Space Team
parent
7c8fffbb3d
commit
52890ca601
@@ -102,4 +102,8 @@ body.dark {
|
||||
.dark .diagnostic-hover {
|
||||
background-color: #3a3a3a;
|
||||
color: #dfdfdf;
|
||||
}
|
||||
|
||||
.dark .smart-cast {
|
||||
background-color: #223C23;
|
||||
}
|
||||
@@ -92,4 +92,8 @@
|
||||
.white .diagnostic-hover {
|
||||
background-color: #eaeaea;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.white .smart-cast {
|
||||
background-color: #DBFFDB;
|
||||
}
|
||||
@@ -1590,6 +1590,7 @@ class HtmlFirDump internal constructor(private var linkResolver: FirLinkResolver
|
||||
is FirCheckedSafeCallSubject -> {
|
||||
+"\$subj\$"
|
||||
}
|
||||
is FirSmartCastExpression -> generate(expression)
|
||||
else -> inlineUnsupported(expression)
|
||||
}
|
||||
}
|
||||
@@ -1601,6 +1602,12 @@ class HtmlFirDump internal constructor(private var linkResolver: FirLinkResolver
|
||||
generate(comparisonExpression.right)
|
||||
}
|
||||
|
||||
private fun FlowContent.generate(smartCastExpression: FirSmartCastExpression) {
|
||||
span(classes = "smart-cast") {
|
||||
generate(smartCastExpression.originalExpression)
|
||||
}
|
||||
}
|
||||
|
||||
private fun FlowContent.generate(safeCallExpression: FirSafeCallExpression) {
|
||||
generate(safeCallExpression.receiver)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user