Paul Woitaschek
import kotlinx.coroutines.runBlocking fun main() { val getTrainingEmoji = GetTrainingEmoji() runBlocking { getTrainingEmoji() } } inline class Emoji(val value: String) class GetTrainingEmoji { suspend operator fun invoke(): Emoji { return Emoji("hello") } }
wasyl
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack Exception Details: Location: TestKt$main$1.invokeSuspend(Ljava/lang/Object;)Ljava/lang/Object; @58: invokevirtual Reason: Type 'Emoji' (current frame, stack[0]) is not assignable to 'GetTrainingEmoji' Current Frame: bci: @58 flags: { } locals: { 'TestKt$main$1', 'java/lang/Object', 'java/lang/Object' } stack: { 'Emoji', 'TestKt$main$1' } Bytecode: 0x0000000: b800 1b4d 2ab4 001f aa00 0000 0000 004e 0x0000010: 0000 0000 0000 0001 0000 0018 0000 003c 0x0000020: 2bb8 0025 2ab4 0029 b400 2fc0 0031 c000 0x0000030: 33b8 0039 2a2a 04b5 001f b600 3d59 2ca6 0x0000040: 0010 2cb0 2bb8 0025 2bc0 0035 b600 41c0 0x0000050: 0033 b800 39b0 bb00 4359 1245 b700 49bf 0x0000060: Stackmap Table: append_frame(@32,Object[#78]) same_frame(@68) same_locals_1_stack_item_frame(@79,Object[#78]) same_frame(@86) at TestKt.main(Test.kt:5) at TestKt.main(Test.kt)
A modern programming language that makes developers happier.