You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to JLS 15.25, typing the conditional operator never fails unless it includes an invocation of a void method. However, the current implementation throws VerifyError when the second and third operands differs in type:
user=> (defclassC ^String (defmm [^int x] (str (if (== x 0) "foo"1))))
Syntax error (VerifyError) compiling at (REPL:1:1).
Bad type on operand stack
Exception Details:
Location:
user/C.m(I)Ljava/lang/String; @17: invokevirtual
Reason:
Type top (current frame, stack[1]) is not assignable to 'java/lang/String'
Current Frame:
bci: @17
flags: { }
locals: { 'user/C', integer }
stack: { 'java/lang/StringBuilder', top }
Bytecode:
0000000: bb00 0e59 b700 0f1b 9a00 081211a7 00040000010: 04b6 0015 b600 19b0
Stackmap Table:
same_locals_1_stack_item_frame(@16,Object[#14])
full_frame(@17,{Object[#2],Integer},{Object[#14],Top})
user=>
The text was updated successfully, but these errors were encountered:
According to JLS 15.25, typing the conditional operator never fails unless it includes an invocation of a void method. However, the current implementation throws
VerifyError
when the second and third operands differs in type:The text was updated successfully, but these errors were encountered: