[Wasm] Fix KtDeclarationWithBody.hasValidJsCodeBody
Empty bodies are not valid jsCode bodies.
This commit is contained in:
committed by
Space Team
parent
c66f1a12cb
commit
bb05c8528f
@@ -25,7 +25,7 @@ fun FunctionDescriptor.hasValidJsCodeBody(bindingContext: BindingContext): Boole
|
||||
}
|
||||
|
||||
private fun KtDeclarationWithBody.hasValidJsCodeBody(bindingContext: BindingContext): Boolean {
|
||||
if (!hasBody()) return true
|
||||
if (!hasBody()) return false
|
||||
val body = bodyExpression!!
|
||||
return when {
|
||||
!hasBlockBody() -> body.isJsCall(bindingContext)
|
||||
|
||||
Reference in New Issue
Block a user