[perl #117421] [BUG] Typing with ::SomeClass instead of SomeClass in 'has' declaration causes the wrong type object to end up in that attribute in Rakudo

2017-12-03 Thread Aleks-Daniel Jakimenko-Aleksejev via RT
Still reproducible (2017.11,HEAD(e5b660e))

On 2013-03-30 16:55:04, masak wrote:
>  r: class A { has ::B $.b }; class B {}; print B.new; print
> A.new.b.new
>  rakudo ba5e04: OUTPUT«B<-905822265>No such method 'new' for
> invocant of type 'B'␤ in block at /tmp/TluLYMLqwz:1␤␤»
>  masak: ^^ hmm
>  that looks wrong.
>  looks like it's retaining the stub, and not replacing it with
> the real B.
> * masak submits rakudobug
>  r: class B {}; class A { has B $.b }; print B.new; print
> A.new.b.new
>  rakudo ba5e04: OUTPUT«B<1785303324>B<1791592750>»
>  r: class B {}; class A { has ::B $.b }; print B.new; print
> A.new.b.new
>  rakudo ba5e04: OUTPUT«B<-931868390>No such method 'new' for
> invocant of type 'B'␤ in block at /tmp/ovh8hRY1hT:1␤␤»
>  interesting.
>  so it has nothing to do with forward references. only with ::


[perl #117421] [BUG] Typing with ::SomeClass instead of SomeClass in 'has' declaration causes the wrong type object to end up in that attribute in Rakudo

2013-03-30 Thread Carl Mäsak
# New Ticket Created by  Carl Mäsak 
# Please include the string:  [perl #117421]
# in the subject line of all future correspondence about this issue. 
# URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=117421 


diakopter r: class A { has ::B $.b }; class B {}; print B.new; print
A.new.b.new
p6eval rakudo ba5e04: OUTPUT«B-905822265No such method 'new' for
invocant of type 'B'␤  in block  at /tmp/TluLYMLqwz:1␤␤»
diakopter masak: ^^ hmm
masak that looks wrong.
masak looks like it's retaining the stub, and not replacing it with
the real B.
* masak submits rakudobug
diakopter r: class B {}; class A { has B $.b }; print B.new; print A.new.b.new
p6eval rakudo ba5e04: OUTPUT«B1785303324B1791592750»
diakopter r: class B {}; class A { has ::B $.b }; print B.new; print
A.new.b.new
p6eval rakudo ba5e04: OUTPUT«B-931868390No such method 'new' for
invocant of type 'B'␤  in block  at /tmp/ovh8hRY1hT:1␤␤»
masak interesting.
masak so it has nothing to do with forward references. only with ::