Ticket #216 (new bug) — at Initial Version

Opened 13 years ago

Last modified 13 years ago

can't override the RPA HLL map from PIR?

Reported by: coke Owned by:
Priority: normal Milestone:
Component: none Version:
Severity: high Keywords: tcl blocker
Cc: Language:
Patch status: Platform:

Description

tcl currently subclasses ResizablePMCArray in a PMC, so that this:

.HLL 'Tcl'
.namespace []

.sub '&list'
  .param pmc argv :slurpy
  .return(argv)
.end

when invoked, is given an argv of type TclList instead of ResizablePMCArray

Trying to convert that PMC to a PIR subclass, I finding I can't get that override working. Here's some sample PIR to demonstrate the problem:

.HLL 'Foo'
.HLL_map 'ResizablePMCArray' = 'RPA'

.sub main
  $P1 = get_class 'ResizablePMCArray'
  $P0 = subclass $P1, 'RPA'
  joe('a','b','c')
.end


.sub joe
  .param pmc argv :slurpy
  $S0 = typeof argv
  say $S0
.end

That prints out ResizablePMCArray instead of RPA.

Note: See TracTickets for help on using tickets.