On Tue, 19 Sep 2017 08:23:07 -0700, c...@zoffix.com wrote:
> m: class Foo is Int {};  my Foo $x .= new: 42; say $x; say $x.WHAT;
> rakudo-moar bb4579: OUTPUT: «Type check failed in assignment to $x;
> expected Foo but got Int (42)␤  in block <unit> at <tmp> line 1␤␤»
> 
> This was broken by the fix to make it correctly handle >64bit ints,
> but apparently there are even articles that show how to subclass Ints:
> https://irclog.perlgeek.de/perl6/2017-09-19#i_15187511
> 
> The likely fix would be Int.new changed to this:
> 
> method new (Int() \value) {
>     nqp::p6bindattrinvres(self.bless, Int, q|$!value|,
> nqp::getattr(nqp::decont(value), Int, q|$!value|))
> }
> 
> But that currently segfaults:
> https://rt.perl.org/Ticket/Display.html?id=132126


Fixed in: https://github.com/rakudo/rakudo/commit/0834036dd4
Tests in: https://github.com/perl6/roast/commit/ba7d5c1dd1

Reply via email to