IR question - do we need special logic to call sus...
# compiler
n
IR question - do we need special logic to call suspend functions from IR? I’m trying to
irCall(suspendFunction)
and no matter how simple the function is - say yield() - native linking fails:
Copy code
java.lang.AssertionError: Assertion failed
	at org.jetbrains.kotlin.backend.konan.llvm.DebugUtilsKt.location(DebugUtils.kt:99)
	at org.jetbrains.kotlin.backend.konan.llvm.DebugUtilsKt.line(DebugUtils.kt:108)
	at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.startLine(IrToBitcode.kt:2153)
	at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.debugFieldDeclaration(IrToBitcode.kt:2179)
	at org.jetbrains.kotlin.backend.konan.llvm.CodeGeneratorVisitor.visitField(IrToBitcode.kt:958)
To add more confusion, the stack trace above references a field even though there are none, I’m calling a suspend function from a suspend function, inside a class with no fields.