Skip to content

Commit c1fb12f

Browse files
committed
Fix a "This type cannot unbox to a native integer" error
Need to .list the Seq returned by .map before assigning to uint8 @buffer
1 parent 5d9c53d commit c1fb12f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

S02-types/compact.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plan 10;
77

88
# compact array acting as a buffer
99
{
10-
my uint8 @buffer = ('A' .. 'Z').map({ .ord });
10+
my uint8 @buffer = ('A' .. 'Z').map({ .ord }).list;
1111
is(@buffer[0], ord('A'), 'basic sanity test (1)');
1212
is(@buffer[25], ord('Z'), 'basic sanity test (2)');
1313
#?rakudo 3 todo "substr issues on compact array - RT #124455"

0 commit comments

Comments
 (0)