Fix suspend function with default argument

In JS BE, fix translation of suspend function with default argument
inherited from interface.

See KT-16658
This commit is contained in:
Alexey Andreev
2017-03-20 19:23:18 +03:00
parent 6ba3812582
commit 0606ebe0dc
8 changed files with 166 additions and 6 deletions
@@ -179,8 +179,7 @@ class CoroutineFunctionTransformer(private val program: JsProgram, private val f
val invokeResume = JsReturn(JsInvocation(JsNameRef(context.metadata.doResumeName, instanceName.makeRef()), JsLiteral.NULL))
functionWithBody.body.statements += JsIf(
suspendedName.makeRef(), JsReturn(instanceName.makeRef()), invokeResume)
functionWithBody.body.statements += JsIf(suspendedName.makeRef(), JsReturn(instanceName.makeRef()), invokeResume)
}
private fun generateCoroutineBody(