# New Ticket Created by  Moritz Lenz 
# Please include the string:  [perl #64098]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=64098 >


class Object is also {
    method f { 'Object' };
}

class Bool is also {
    method f { 'Bool' };
}

say True.f;         # Object
say Bool::True.f;   # Bool

For the short name it picks up the method defined in Object, not in the more
specific type. This defect also makes True.perl output the Wrong Thing™.

Possibly related:

./perl6 -e 'say True ~~ False'
Method 'ACCEPTS' not found for invocant of class ''
current instr.: 'infix:~~' pc 19533 (src/builtins/match.pir:18)
called from Sub '_block14' pc 67 (EVAL_16:40)
called from Sub '!UNIT_START' pc 17513 (src/builtins/guts.pir:350)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc 950
(src/PCT/HLLCompiler.pir:527)
called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1510
(src/PCT/HLLCompiler.pir:798)
called from Sub 'parrot;Perl6;Compiler;main' pc 21852 (perl6.pir:164)

Reply via email to