deinspanjer
05/27/2017, 3:46 PMobj::class.simpleName
, and it said I needed to add the reflection jar to do that. I added it to my Maven Dependencies, but now, when I try to run, I get this error, even if I take out the ::class thing and leave my code just as it was when it runs without the reflection jar:
Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
Location:
kotlin/reflect/jvm/internal/ReflectionFactoryImpl.function(Lkotlin/jvm/internal/FunctionReference;)Lkotlin/reflect/KFunction; @5: invokestatic
Reason:
Type 'kotlin/jvm/internal/FunctionReference' (current frame, stack[2]) is not assignable to 'kotlin/jvm/internal/CallableReference'
Current Frame:
bci: @5
flags: { }
locals: { 'kotlin/reflect/jvm/internal/ReflectionFactoryImpl', 'kotlin/jvm/internal/FunctionReference' }
stack: { uninitialized 0, uninitialized 0, 'kotlin/jvm/internal/FunctionReference' }
Bytecode:
0x0000000: bb00 1059 2bb8 0042 2bb6 0020 2bb6 0021
0x0000010: 2bb6 001f b700 38b0
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at kotlin.jvm.internal.Reflection.<clinit>(Reflection.java:32)
at kotlin.io.ConsoleKt.<clinit>(Console.kt)
at com.jsonlogic.RunnerKt.readInput(Runner.kt:40)
at com.jsonlogic.RunnerKt.main(Runner.kt:14)
udalov
kotlin-reflect
and kotlin-stdlib