Ticket #1449 (closed todo: fixed)
Add support for String PMC in NameSpace::get_pmc_keyed
| Reported by: | Austin_Hastings | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | none | Version: | 2.0.0 |
| Severity: | medium | Keywords: | |
| Cc: | Language: | ||
| Patch status: | Platform: |
Description
Presently, NameSpace PMCs support keyed_pmc access only for Key PMC types:
austin@andLinux:~/kakapo$ cat test.pir
.sub main
$P1 = get_hll_namespace
say "Testing with Key"
$P0 = new 'Key'
$P0 = 'Foo'
$P2 = $P1[$P0] # OKAY
say "Testing with String PMC"
$P0 = new 'String'
$P0 = 'Foo'
$P2 = $P1[$P0] # FAIL
.end
austin@andLinux:~/kakapo$ parrot test.pir
Testing with Key
Testing with String PMC
Invalid namespace key in get_pmc_keyed_str
current instr.: 'main' pc 22 (test.pir:12)
Given than NameSpace supports keyed access with keyed_str, it should also support String PMCs.
Change History
Note: See
TracTickets for help on using
tickets.
