Ticket #2540
I'm able to cause a java.lang.VerifyErrors though some edgy Fantom code. It's probably not worth fixing, but I thought I'd report it for completeness:
java.lang.VerifyErrors
fansh> [,].findAll |f| { false } [,] fansh> [,].findAll |f| { false {echo(f)} } sys::Err: java.lang.VerifyError: (class: fan/sh104/FanshEval$_eval$0, method: doCall signature: (Ljava/lang/Object;)Z) Expecting to find object/array on stack
Note the addition of { echo(it) } is fine when returning from normal functions:
{ echo(it) }
fansh> |->Obj| { "wot" {echo(it)} }() wot
Ticket promoted to #2540 and assigned to brian
Ticket resolved in 1.0.70
The fundamental issue looks to be using a Obj.with it-block on a value type. I added a check to disallow that since it doesn't ever really make sense.
Login or Signup to reply.
SlimerDude Mon 23 May 2016
I'm able to cause a
java.lang.VerifyErrors
though some edgy Fantom code. It's probably not worth fixing, but I thought I'd report it for completeness:Note the addition of
{ echo(it) }
is fine when returning from normal functions:brian Tue 24 May 2016
Ticket promoted to #2540 and assigned to brian
brian Wed 4 Oct 2017
Ticket resolved in 1.0.70
The fundamental issue looks to be using a Obj.with it-block on a value type. I added a check to disallow that since it doesn't ever really make sense.