Raku / nqp

NQP
Other
336 stars 131 forks source link

[JVM] Using back-references with aliases dies with internal error #808

Closed usev6 closed 10 months ago

usev6 commented 1 year ago
$ ./nqp-j -e '"aa" ~~ /$<start>=<alpha> $<start>/'
Can not invoke object '&has_aliased_name'
  in !BACKREF (gen/jvm/stage2/QRegex.nqp:1842)
  in <anon> (-e)
  in parse (gen/jvm/stage2/QRegex.nqp:2283)
  in ACCEPTS (gen/jvm/stage2/QRegex.nqp:2370)
  in ACCEPTS (gen/jvm/stage2/NQPCORE.setting:710)
  in <mainline> (-e:1)
  in eval (gen/jvm/stage2/NQPHLL.nqp:1218)
  in <anon> (gen/jvm/stage2/NQPHLL.nqp:1331)
  in command_eval (gen/jvm/stage2/NQPHLL.nqp:1328)
  in command_line (gen/jvm/stage2/NQPHLL.nqp:1311)
  in MAIN (gen/jvm/stage2/NQP.nqp:4191)
  in <mainline> (gen/jvm/stage2/NQP.nqp:4189)
  in <anon> (gen/jvm/stage2/NQP.nqp)

I'm pretty sure this is related to https://github.com/Raku/nqp/commit/a124861a37. But I have no clue, what needs to be done to let nqp-j know how to invoke the subroutine has_aliased_name.

I'm considering to add a workaround for the JVM backend for now. But I wanted to file this issue, hoping that a clean solution can be found (but at least to have a reference to the problem).

usev6 commented 10 months ago

Since I've merged the linked PR with a work around, I'll close this issue now.