Ticket #71 (closed bug: fixed)

Opened 13 years ago

Last modified 13 years ago

Fix class registry to allow HLL classes of identical names

Reported by: pmichaud Owned by: chromatic
Priority: major Milestone: 0.9.1
Component: core Version:
Severity: medium Keywords:
Cc: Language:
Patch status: Platform: all

Description

(See also RT #43419 for other examples)

Creating a HLL class with a name of 'Object' results in "Class Object already registered!".

$ cat y.pir
.HLL "perl6", ""

.namespace

.sub main :main
# works
$P0 = new 'Class'
$P0.'name'('AnObject')
$S0 = $P0
say $S0

# fails
$P0 = new 'Class'
$P0.'name'('Object')
$S0 = $P0
say $S0
.end

$ ./parrot y.pir
perl6;AnObject
Class Object already registered!
current instr.: 'main' pc -1 ((unknown file):-1)
called from Sub 'main' pc 36 (y.pir:12)
$

Attachments

class_registry.diff Download (81.8 KB) - added by tewk 13 years ago.

Change History

Changed 13 years ago by tewk

Changed 13 years ago by chromatic

Barring some syntax changes in the example, this works for me as of r35977.

Changed 13 years ago by kjs

  • platform set to all

Changed 13 years ago by coke

An example with different syntax but that seems to want to do the same thing fails (well, the test passes, but it's written to fail) in t/oo/names.t

Patrick, can you double check the test there, and here, and let us know if this is closable? Thanks.

Changed 13 years ago by coke

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

per pmichaud, the original issue here seems to be resolved.

Note: See TracTickets for help on using tickets.