[JS IR] Make coroutines work with new lambda scheme

- Do not create extra class for suspend lambda
This commit is contained in:
Roman Artemev
2020-02-25 13:34:19 +03:00
committed by romanart
parent 3783205fb7
commit b9eff4b246
5 changed files with 333 additions and 469 deletions
@@ -526,7 +526,7 @@ fun IrClass.addFakeOverrides() {
).apply {
descriptor.bind(this)
parent = this@addFakeOverrides
overriddenSymbols += overriddenFunctions.map { it.symbol }
overriddenSymbols = overriddenFunctions.map { it.symbol }
copyParameterDeclarationsFrom(irFunction)
copyAttributes(irFunction)
}
@@ -537,7 +537,9 @@ fun IrClass.addFakeOverrides() {
.associate { it.value.first() to createFakeOverride(it.value) }
.toMutableMap()
declarations += fakeOverriddenFunctions.values
for (fo in fakeOverriddenFunctions.values) {
addChild(fo)
}
}
fun createStaticFunctionWithReceivers(