Kotlin to Java bytecode. Can not understand one variable

Kotlin code:

fun main(args: Array<String>) {
    val a = 42.9
    println("${a::class.simpleName}")
}

Java Decompile code:

   public static final void main(@NotNull String[] args) {
      Intrinsics.checkNotNullParameter(args, "args");
      double a = 42.9D;
      String var3 = String.valueOf(Reflection.getOrCreateKotlinClass(Double.TYPE).getSimpleName());
      boolean var4 = false;
      System.out.println(var3);
   }

For what “boolean var4 = false” ???

1 Like

From what I remember they are used to pause debugger on breakpoints inside inline functions. I can’t find a source right now, but someone commented on that before.

1 Like

You’re correct, disabling the inline optimization in the compiler will not generated the

  L3
    ICONST_0
    ISTORE 4

which the decompiler converts to a boolean.

1 Like