Ticket #174 (closed bug: fixed)

Opened 13 years ago

Last modified 13 years ago

can't store strings in hashes in PIRC

Reported by: kjs Owned by: kjs
Priority: normal Milestone:
Component: pirc Version:
Severity: medium Keywords: hash
Cc: Language:
Patch status: Platform:

Description (last modified by kjs) (diff)

generated bytecode to store strings in a hash doesn't work.

.sub main
 $P0 = new "Hash"
 $P0["hi"] = "hello there"
 $S0 = $P0["hi"]
 print $S0 # should print 'hello there'

doesn't work. This needs fixing.

Change History

Changed 13 years ago by kjs

  • description modified (diff)

Changed 13 years ago by allison

  • cc parrot-dev@… removed

Changed 13 years ago by kjs

  • status changed from new to closed
  • resolution set to fixed

per r35717, this is implemented:

.sub main
  $S0 = "hi"
  $P0 = new "Hash"
  $P0[$S0] = 42
  $I0 = $P0["hi"]
  say $I0 # prints 42
  $P0["hi"] = "hi there"
  $S0 = $P0[$S0]
  say $S0 # prints "hi there"

closing ticket.

Note: See TracTickets for help on using tickets.