Commit 618eaff 1 parent 5f5af38 commit 618eaff Copy full SHA for 618eaff
File tree 1 file changed +7
-2
lines changed
compiler/fir/tree/src/org/jetbrains/kotlin/fir/renderer
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() {
16
16
override fun FirDeclaration.renderDeclarationAttributes () {
17
17
if (attributes.isNotEmpty()) {
18
18
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
+ }
20
26
.ifEmpty { return }
21
27
.joinToString { (name, value) -> " $name =$value " }
22
28
printer.print (" [$attributes ] " )
@@ -39,7 +45,6 @@ open class FirDeclarationRendererWithAttributes : FirDeclarationRenderer() {
39
45
is FirCallableSymbol <* > -> callableId.toString()
40
46
is FirClassLikeSymbol <* > -> classId.asString()
41
47
is FirCallableDeclaration -> symbol.callableId.toString()
42
- is Lazy <* > -> value.toString()
43
48
else -> toString()
44
49
}
45
50
}
You can’t perform that action at this time.
0 commit comments