# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #127845] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=127845 >
<psch> m: class A { has uint8 $.x; submethod BUILD(:$!x) { } }; A.new(:x(5)).perl.say # but..? <camelia> rakudo-moar c8ec5a: OUTPUT«Cannot modify an immutable uint8 in submethod BUILD [...]» <moritz> m: class A { has uint8 $.x; submethod BUILD(uint8 :$!x) { } }; A.new(:x(5)).perl.say <camelia> rakudo-moar c8ec5a: OUTPUT«Bytecode validation error at offset 102 [...]» <moritz> psch: I think the problem is that argument binding is *binding*, and you cannot bind to natively typed containers <moritz> or something along those lines <moritz> of course, that's LTA :/ <psch> especially with the roundabout binding hidden in the submethod invocation <psch> that's gonna be a fun awesome error message to think up... :) <moritz> well, I'd hope that we can modify the argument binding to deal with native attributes properly <moritz> though I'm not nearly deep enough into the trench to know how feasible that is * masak submits rakudobug