I'm having some trouble getting the new range unti...
# compiler
g
I'm having some trouble getting the new range until syntax (
..<
) working using the embedded compiler. The code seems to compile fine, but trying to execute it produces the following error:
Copy code
java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    MainKt$Companion.main()V @5: invokevirtual
  Reason:
    Type integer (current frame, stack[0]) is not assignable to 'I'
  Current Frame:
    bci: @5
    flags: { }
    locals: { 'MainKt$Companion' }
    stack: { integer, integer }
  Bytecode:
    0000000: b800 4503 07b6 000d 59b6 0013 3cb6 0016
    0000010: 3d1b 1ca3 0016 00b2 001c 1bb6 0022 1b1c
    0000020: 9f00 0984 0101 a7ff f0b1               
  Stackmap Table:
    append_frame(@22,Integer,Integer)
    same_frame(@41)
Do I need to enable a later compiler version during compilation? Currently I'm leaving that configuration setting untouched.
FWIW, a colleague looked at this and it looks like the bytecode being emitted by the compiler here is simply incorrect. We're working on a reproduction.
OK, it looks like this is behind a command-line feature flag. I guess it would be nice if this omission didn't result in incorrect bytecode being generated.
👍 1