We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c360a3 commit 239f25dCopy full SHA for 239f25d
S12-attributes/native.t
@@ -2,7 +2,7 @@ use v6;
2
3
use Test;
4
5
-plan 45;
+plan 48;
6
7
class C {
8
has int $.int-ro = 1;
@@ -121,3 +121,24 @@ class MV {
121
}
122
is MV.new(start => 42).start, 42, 'uint64 native attribute accessor works';
123
is MV.new(start => 4).s, 5, 'uint64 native attribute use in method works';
124
+
125
+# RT #131122
126
+{
127
+ my class C1 {
128
+ has uint8 $.ff;
129
+ }
130
+ my $c = C1.new(ff => 255);
131
+#?rakudo todo 'RT #131122'
132
+ is $c.ff, 255, 'large unsigned ints';
133
134
+ my class C2 is repr('CStruct') {
135
+ has uint8 $.ff is rw;
136
137
138
+ my $c2 = C2.new;
139
+ $c2.ff = 100;
140
+ is $c2.ff, 100, 'unsigned int sanity';
141
+ $c2.ff = 200;
142
143
+ is $c2.ff, 200, 'large unsigned ints';
144
+}
0 commit comments