File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
compiler/fir/tree/src/org/jetbrains/kotlin/fir/renderer Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,13 @@ open class FirDeclarationRendererWithAttributes : FirDeclarationRenderer() {
1616 override fun FirDeclaration.renderDeclarationAttributes () {
1717 if (attributes.isNotEmpty()) {
1818 val attributes = getAttributesWithValues()
19- .mapNotNull { (klass, value) -> value?.let { klass to value.renderAsDeclarationAttributeValue() } }
19+ .mapNotNull { (klass, value) ->
20+ val unwrappedValue = when (value) {
21+ is Lazy <* > -> value.value
22+ else -> value
23+ } ? : return @mapNotNull null
24+ klass to unwrappedValue.renderAsDeclarationAttributeValue()
25+ }
2026 .ifEmpty { return }
2127 .joinToString { (name, value) -> " $name =$value " }
2228 printer.print (" [$attributes ] " )
@@ -39,7 +45,6 @@ open class FirDeclarationRendererWithAttributes : FirDeclarationRenderer() {
3945 is FirCallableSymbol <* > -> callableId.toString()
4046 is FirClassLikeSymbol <* > -> classId.asString()
4147 is FirCallableDeclaration -> symbol.callableId.toString()
42- is Lazy <* > -> value.toString()
4348 else -> toString()
4449 }
4550}
You can’t perform that action at this time.
0 commit comments