Ticket #809 (closed bug: fixed)

Opened 5 years ago

Last modified 4 years ago

Opcode 'isa' does not accept RSA PMC for class

Reported by: Austin_Hastings Owned by:
Priority: normal Milestone:
Component: core Version: 1.3.0
Severity: medium Keywords: test
Cc: Language:
Patch status: Platform:

Description

This code does not work:

    find_lex $P95, "node"
    $P0 = split '::', "PCT::Node"
    isa $I96, $P95, $P0

It produces an error:

get_string() not implemented in class 'ResizableStringArray'

According to Pmichaud, RSA should be a valid parameter type for many of the class-related opcodes (see #159 for more).

According to me, the default pmc (which is where I suspect a lot of this windows up relegated) makes no provision for PMC types other than Class.

For now I have a work-around, provided by Pmichaud:

   $P0 = split '::', 'PCT::Node'
   $P1 = get_class $P0
   $I0 = isa node, $P1

Change History

Changed 5 years ago by jkeenan

  • component changed from none to core

Changed 4 years ago by coke

  • keywords test added

This now prints "1":

.sub foo
  load_language "PCT"
  $P1 = new ['PCT'; 'Node']
  $P0 = split "::", "PCT::Node"
  $I0 = isa $P1, $P0
  say $I0
.end

This just needs a test and we can close it out.

Changed 4 years ago by cotto

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

I committed a test based on coke's code in r48683. I'll mark this as closed.

Note: See TracTickets for help on using tickets.