Ticket #1426 (closed bug: wontfix)
C3 linearizer fails on two plain (P6object) classes
Reported by: | Austin_Hastings | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | none | Version: | 2.0.0 |
Severity: | high | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: |
Description
This test code:
class Foo::Parent { method x() { say("x"); } } class Foo::Child { method y() { say("y"); } } P6metaclass.add_parent(Foo::Child, Foo::Parent);
fails when fed to parrot-nqp:
Could not build C3 linearization: ambiguous hierarchy current instr.: 'parrot;P6metaclass;add_parent' pc 224 (runtime/parrot/library/P6object.pir:232) called from Sub '_block11' pc 0 (EVAL_1:6) called from Sub 'parrot;PCT;HLLCompiler;eval' pc -1 ((unknown file):-1) called from Sub 'parrot;PCT;HLLCompiler;evalfiles' pc 1303 (src/PCT/HLLCompiler.pir:707) called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1489 (src/PCT/HLLCompiler.pir:794) called from Sub 'parrot;NQP;Compiler;main' pc -1 ((unknown file):-1)
Since the P6object system automatically adds a P6object root class as a parent to created classes, the two classes being merged look like:
P6 -> Child P6 -> Parent
It seems like C3 should be able to work that out.
Change History
Note: See
TracTickets for help on using
tickets.