On Wed, 06 Apr 2016 01:30:45 -0700, masak wrote: > <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
Fixed with https://github.com/rakudo/rakudo/commit/77a2ff13d2828eb36daad9a8ce954173e06413ef. Tests needed