Ticket #218 (reopened deprecation)
change function of get_addr and set_addr
Reported by: | coke | Owned by: | whiteknight |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Version: | |
Severity: | fatal | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: | all |
Description (last modified by bacek) (diff)
I would expect the following code to print out 'a' twice, once for each type. This patch solves the ticket. But I'm not sure how "kosher" is it.
.sub main sortme('ResizablePMCArray') $P1 = get_class 'ResizablePMCArray' $P0 = subclass $P1, 'RPA' sortme('RPA') .end .sub sortme .param string type $P0 = new type $P0[0]='z' $P0[1]='a' .local pmc comparator comparator = get_global 'ascii' $P0.'sort'(comparator) $S0 = $P0[0] say $S0 .end .sub ascii .param string a .param string b $I0 = cmp_str a,b .return($I0) .end
Instead, it generates:
a Method 'sort' not found for invocant of class 'RPA' current instr.: 'sortme' pc 53 (foo.pir:21) called from Sub 'main' pc 25 (foo.pir:10)
sort is a method on FixedPMCArray; it's inherited by esizablePMCArray. It is apparently then NOT inherited by my PIR level subclass.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.