Ticket #909 (closed bug: duplicate)

Opened 12 years ago

Last modified 11 years ago

Difficulty subclassing through P6metaclass when subclass and parent have the same name.

Reported by: treed Owned by: whiteknight
Priority: normal Milestone:
Component: none Version: 1.4.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

I've run across a bug while attempting to fix  http://github.com/cardinal/cardinal/issues#issue/34 where subclasses of parrot classes in a different HLL (and, hence, different namespaces) that happen to have the same name don't subclass correctly, but only through P6metaclass. Using the subclass opcode works fine.

Attachments

test.pir Download (0.7 KB) - added by treed 12 years ago.
Exhibits the bug

Change History

Changed 12 years ago by treed

Exhibits the bug

Changed 11 years ago by whiteknight

  • owner set to whiteknight

Changed 11 years ago by whiteknight

  • status changed from new to assigned

I suspect this issue is exactly related to #1492.

Changed 11 years ago by whiteknight

  • status changed from assigned to closed
  • resolution set to duplicate

Yes, looking through the P6object code, it definitely looks like this is a duplicate of #1492. That ticket shows that attempting to autovivify a class by using namespace object fails. P6object first finds the namespace and then uses that to lookup the class, which manifests the problem.

Solution is to either fix #1492 (perferred) or change P6object to avoid looking up classes from namespaces. I'll dig into #1492 a little bit today to see what I can see. I'm closing this ticket as a duplicate.

Note: See TracTickets for help on using tickets.