# New Ticket Created by Daniel Green # Please include the string: [perl #131310] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=131310 >
[19:15] <MasterDuke_> m: subset uint15 of uint16 where 0 <= * <= 32775; my uint15 $a = 1 [19:15] <timotimo> right [19:15] <+camelia> rakudo-moar 4298dd: OUTPUT: «Type check failed in assignment to $a; expected uint15 but got Int (1) in block <unit> at <tmp> line 1» [19:16] <MasterDuke_> seems like a bug to me [19:16] <timotimo> do we do subsets of natives at all? anywhere? [19:16] <MasterDuke_> but i don't know if subsetting natives is even allowed [19:18] <MasterDuke_> m: subset uint15 of uint16 where 0 <= * <= 32775; my uint16 $a = 1; my uint15 $b = $a [19:18] <+camelia> rakudo-moar 4298dd: OUTPUT: «Type check failed in assignment to $b; expected uint15 but got Int (1) in block <unit> at <tmp> line 1» [19:19] <MasterDuke_> i would think it should either work or error when i try to create the subset of the native type [19:21] <MasterDuke_> a quick grep in roast shows nothing for subset of native types [19:22] <timotimo> perhaps an NYI exception would be in order [19:22] <timotimo> can you find anything in perl6-all-modules? [19:23] <MasterDuke_> nothing there either [19:23] <timotimo> good [19:23] <timotimo> so nobody found a way to make it work [19:25] <MasterDuke_> i'll rakudobug it so it doesn't slip through the cracks [19:26] <MasterDuke_> any thought's on whether it should or shouldn't be allowed? [19:27] <timotimo> it'd be cool if we could [19:27] <timotimo> it might be a SMOP It's not just a uint thing (since they have some other problems), native ints, nums, and strs do the same thing.