Ticket #1125 (closed bug: fixed)

Opened 12 years ago

Last modified 12 years ago

[BUG] imcc handles backslashes improperly in sub names

Reported by: pmichaud Owned by: pmichaud
Priority: critical Milestone:
Component: nqp Version: 1.7.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:


Sub declarations that contain backslashes in the name aren't processed correctly. Here's a demonstration script:

$ cat z.pir
.sub main
    say "xyz:<\" \">"
    .const 'Sub' $P0 = 'foo'
    say $P0

    say ""

    say "xyz:<\\>"
    .const 'Sub' $P1 = 'bar'
    say $P1

.sub "xyz:<\" \">" :subid('foo')
    say "xyz-quote"

.sub "xyz:<\\>" :subid('bar')
    say "xyz-backslash"

$ ./parrot z.pir
xyz:<" ">
xyz:<\" \">


The strings for the subnames should end up having the save value as the printed strings above them.


Change History

Changed 12 years ago by chromatic

  • status changed from new to closed
  • version changed from 1.6.0 to 1.7.0
  • resolution set to fixed

Tests stolen from your example and fixed in r41992, thanks!

Note: See TracTickets for help on using tickets.