# New Ticket Created by Aleks-Daniel Jakimenko-Aleksejev # Please include the string: [perl #130431] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=130431 >
Code: class Mebibytes is Int { method Str { (self/1024/1024).Int ~ "M" } }; my Mebibytes $a .= new(183456783); $a.say; # fancy enough? Result (2016.09): 174M Result (HEAD): Type check failed in assignment to $a; expected Mebibytes but got Int (183456783) in block <unit> at /tmp/4Vz0jddWQp line 1 Bisectable points to https://github.com/rakudo/rakudo/commit/798c2e2dca34e5cf93da99d1f401eb161efca854 <Zoffix> AlexDaniel, please rakudobug it. I'll take a look tomorrow. At least half of https://github.com/rakudo/rakudo/commit/798c2e2dca34e5cf93da99d1f401eb161efca854 is wrong, because that comment lies; it doesn't give a "decoupled" Int