Skip to content

Commit 1ec29bf

Browse files
committed
Kotlin: Don't use deprecated createBlockBody
The function that takes a list of statements is hidden in upstream master.
1 parent d511d46 commit 1ec29bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

java/kotlin-extractor/src/main/kotlin/MetaAnnotationSupport.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ class MetaAnnotationSupport(private val logger: FileLogger, private val pluginCo
276276
run { logger.warnElement("Expected property's parent class to have a receiver parameter", parentClass); return }
277277
val newParam = copyParameterToFunction(thisReceiever, this)
278278
dispatchReceiverParameter = newParam
279-
body = factory.createBlockBody(
280-
UNDEFINED_OFFSET, UNDEFINED_OFFSET, listOf(
279+
body = factory.createBlockBody(UNDEFINED_OFFSET, UNDEFINED_OFFSET).apply({
280+
this.statements.add(
281281
IrReturnImpl(
282282
UNDEFINED_OFFSET, UNDEFINED_OFFSET,
283283
pluginContext.irBuiltIns.nothingType,
@@ -294,7 +294,7 @@ class MetaAnnotationSupport(private val logger: FileLogger, private val pluginCo
294294
)
295295
)
296296
)
297-
)
297+
})
298298
}
299299
}
300300

0 commit comments

Comments
 (0)