Raku Cases › Containers & assignment

Containers & assignment

Scalars, binding against assignment, defaults, Nil, Proxy, itemization.

257 rules from 174 tests. 158 of those tests are confirmed on both engines: Raku++ and Rakudo 2026.11 both pass, or Raku++ gives Rakudo's answer on every probe of a family. The verdict is the test's, not each rule's. How to read a case.

array-holesRaku++ matches Rakudo on all 18 probes2026-11-28 · 10a7dd49
  1. 1

    An array slot nobody wrote (past a gap, after :delete, in a fresh shaped array) is a hole: it does not exist, .List shows it as Nil, and a read gives the element default (Any, the element type, or the is default value).

    @a[3] = 1 on an empty array leaves three holes

  2. 2

    Whatever is read out of an array hole, or copied from one by assignment, is a value and no hole.

proxy-fetchRaku++ matches Rakudo on 40 of 47 probes2026-11-28 · 04a1722e · #281
  1. 2

    A Proxy is fetched once wherever a value is bound, and stays live where it is bound raw.

stored-nil-elementsRaku++ matches Rakudo on 35 of 36 probes2026-11-28 · 7249d816
  1. 1

    A Nil stored into an array element is the container's default by every route: @a.push: Nil, push @a, Nil, @a.ASSIGN-POS(0, Nil) and Array.new(Nil) leave what @a[0] = Nil leaves.

  2. 2

    A Nil argument to splice is Any, not the element default, and a typed array refuses it.

  3. 3

    A Nil in a List stays Nil, because a List is no container.

stored-undefined-elementsRaku++ matches Rakudo on all 27 probes2026-11-28 · 2889ad4a
  1. 1

    An undefined value stored into an array element is a value that is there: after my @a = $u, @a.push: $u or @a[0] = $u the slot exists and reads as (Any); only a slot nobody wrote is a hole.

anton-batch-2026-09-12Raku++ passesRakudo passes2026-09-12 · 6b2a1718
  1. 1

    An is rw parameter passed on to another routine's is rw parameter aliases the caller's original container, so a closure that writes the inner parameter after both routines have returned still changes the caller's variable. inferred

    sub inner($y is rw) { return sub { $y = "inner-wrote" } }; sub outer($x is rw) { return inner($x) }; my $v = "initial"; outer($v)() leaves $v as "inner-wrote"

More from this test: Operators (1), Syntax & parsing (1).

array-coercion-decontRaku++ passesRakudo passes2026-07-28 · 5ab16965
  1. 1

    An Array read out of a hash value or a scalar is itemized, so assigning it to an array gives one element.

    my @a = %h<k> is one element

  2. 2

    .Array decontainerizes: it returns a plain Array, so my @a = $v.Array spreads the elements.

array-elements-are-items-to-list-methodsRaku++ passesRakudo passes2026-10-16 · 43e63076
  1. 3

    An index read of an Array element that holds a Hash is an itemized Hash, as one that holds an Array is an itemized Array.

More from this test: Lists & laziness (1).

array-ends-are-containersRaku++ passesRakudo passes2026-10-27 · 50aebf54
  1. 1

    .first, .head and .tail of an Array hand back the elements' own containers, so binding, a sigilless name or a for topic over them writes the array.

    my \x = @a.first; x = 9 writes @a, and for @a.head(2) { $_ = 7 } changes the first two elements

  2. 2

    .first(:k) and the .first/.head/.tail of a List give values, not containers.

array-head-keeps-element-containersRaku++ passesRakudo passes2026-10-29 · 67c35490 · #215
  1. 1

    A kept @a.head(n) or @a.tail(n) holds the array's element containers: a later write to the array shows through it, a write through it reaches the array, and @a = … leaves it the elements the array had.

    my \h = @a.head(2); @a[0] = 42 reads (42, 2)

More from this test: divergences (1).

array-is-list-containerRaku++ passesRakudo passes2026-09-11 · 6d82fac4
  1. 1

    my @list is List = … declares a List, not an Array.

array-views-typedRaku++ passesRakudo passes2026-10-06 · 97399de2
  1. 1

    A list of a typed Array's elements, such as @t.reverse, writes through to the array, and the array's element type checks the write as a direct store into it does.

  2. 2

    @a.List and a literal list of values are read-only: an assignment to one of their elements is refused.

    Also held by array-views-write-through.

array-views-write-throughRaku++ passesRakudo passes2026-10-06 · 97399de2
  1. 1

    A list of an Array's own elements — @a.reverse, .rotate, .sort, .Seq, a slice @a[0,1] — holds the array's containers, so a write through it (also through .List of it) lands in the array.

    with $r such a list, $r[0] = 9, $r[1]++ and $r[2] ~= 'x' change @a

  2. 3

    A list made from a native array's elements does not write through to the array, since a native array has no element containers. inferred

assign-pos-key-itemizeRaku++ passesRakudo passes2026-10-09 · 3970398c
  1. 1

    ASSIGN-POS and ASSIGN-KEY store an Array or a Hash itemized in the slot's Scalar, as @a[$i] = … and %h<k> = … do, so the value read back keeps its $ in .raku.

attribute-init-drops-readonlyRaku++ passesRakudo passes2026-09-27 · d636b015
  1. 1

    A value entering an attribute through the default constructor, an attribute default, .clone or an attributive parameter (method set($!x), BUILD(:$!x)) is assigned into the attribute's own container, so the attribute stays assignable even when the value was read through a readonly parameter, a sigilless name or a constant.

audited-language-gaps-1Raku++ passesRakudo passes2026-10-04 · 76f5426d
  1. 8

    A typed state variable type-checks later assignments.

More from this test: Concurrency (1), Exceptions & control flow (1), Hashes & sets (1), Lists & laziness (2), Operators (1), Regexes & grammars (2), Signatures & dispatch (3), Syntax & parsing (2).

audited-language-gaps-2Raku++ passesRakudo passes2026-10-04 · 39c1aeb6
  1. 1

    .self decontainerizes its invocant.

More from this test: Compile-time errors (2), Dates & times (1), Lists & laziness (3), Operators (1), Regexes & grammars (2), Strings & Unicode (2), Types & coercion (1).

bare-sigil-anonymous-declarationRaku++ passesRakudo passes2026-09-01 · 025e1abd
  1. 1

    my % and my & declare anonymous variables, and a block containing such a declaration runs without error.

    { my % } runs

    Also held by bare-sigil-anon-in-block.

  2. 2

    A bare @ or % term is a fresh empty container every time, never the anonymous variable declared or assigned earlier.

    after my @ = 1, 2, a later bare @ is an empty Array

bind-pos-variable-cellRaku++ passesRakudo passes2026-10-21 · cce315ef
  1. 1

    @a.BIND-POS($i, $var) and %h.BIND-KEY($k, $var) bind the variable's container, so the element keeps the container the variable had when it was bound even after the variable is rebound.

    after @a.BIND-POS(0, $v); $v := $w the element still reads the container $v had

  2. 2

    BIND-POS and BIND-KEY given a readonly parameter bind its value in a container of its own.

bind-to-hash-slotRaku++ passesRakudo passes2026-08-05 · 4f182b98
  1. 1

    $x := %h{key} binds the hash slot, so a later $x = v writes into the hash, autovivifying when a walk rebinds one level at a time.

  2. 2

    %a := %b binds %a to the same Hash container as %b. inferred

bind-type-object-immutableRaku++ passesRakudo passes2026-10-03 · 88890183
  1. 1

    Binding a name to a type object binds the value with no container, so a later assignment dies.

    my $x := Int; $x = 5 dies

  2. 2

    The error for assigning to a name bound to a type object depends on the operator: plain = asks for a concrete object, and every other form (~=, +=, a sigilless name) says the type object is immutable.

binding-slots-ops-create-invocantRaku++ passesRakudo passes2026-08-30 · 945285cc · #47
  1. 1

    Binding a scalar to an array element (my $node := @a[$pos]) aliases the slot, so assigning through the scalar writes the array.

  2. 2

    my \p = @a[i] binds the sigilless name to the element, so assigning to p writes the element, while reading p as an rvalue gives the value.

More from this test: Classes, roles & the MOP (3), Operators (2).

blob-element-op-assign-refusedRaku++ passesRakudo passes2026-11-09 · 9d2cf3bf
  1. 1

    A compound assignment to a Blob's element, $blob[0] += 1, is refused with X::Assignment::RO, as $blob[0] = 2 is.

    my $b = Blob.new(1,2); $b[0] += 1 dies with X::Assignment::RO

More from this test: divergences (1).

blob-iteration-and-mutate-lvalueRaku++ passesRakudo passes2026-07-31 · 0619f097
  1. 2

    A parenthesised mutating method call is an assignable target, as in (my $x .= new)[$i] = v.

    (state buf32 $w .= new)[$j] = … stores into $w

More from this test: Numerics (1).

blob-param-costs-nothingRaku++ passesRakudo passes2026-10-29 · 55565059 · #177
  1. 2

    A write to a Buf through a routine's parameter reaches the caller's Buf.

More from this test: Types & coercion (1).

bound-attribute-truthinessRaku++ passesRakudo passes2026-09-11 · 6d82fac4
  1. 1

    An attribute bound with := reads through to the bound value in boolean context, so one bound to an undefined value is false.

    after $!recurse := $recurse with $recurse undefined, $!recurse || … evaluates the right side

More from this test: Lists & laziness (1), Syntax & parsing (1).

bound-element-compound-assignRaku++ passesRakudo passes2026-10-04 · c1fc5c06
  1. 1

    +=, ~= and ++ on a scalar bound to an array element read and write that element.

    after my $c := @arr[0], $c += 1 adds 1 to the element

bound-element-reads-through-proxyRaku++ passesRakudo passes2026-10-30 · 594d4aac
  1. 1

    An element bound to another container (%specs<x> := %data<tests>) reads as that container's value in every value context: prefix + and -, the zen slices <> and [], and @(…).

    +$spec.value counts the bound array's elements and for $spec.value<> { … } walks them

  2. 2

    A user's Proxy is read through its FETCH by prefix + and -, the zen slices and @(…).

bound-element-storeRaku++ passesRakudo passes2026-10-24 · 84add3b1
  1. 1

    A store into an array element bound to a container reaches that container, whether by element assignment, slice assignment or list assignment.

    @b[1] := my $c; @b[1] = 9 sets $c, and so do @b[0, 1] = … and (@b[0], @b[1]) = …

  2. 2

    Binding to a declaration (@b[1] := my $c, $x := my $c) binds to the very variable the declaration makes.

bound-scalar-array-identityRaku++ passesRakudo passes2026-09-11 · 6d82fac4
  1. 1

    A scalar bound to an array is that array, and =:= says so.

    my $h := @a; $h =:= @a is True

bound-slice-is-a-listRaku++ passesRakudo passes2026-10-29 · 820388ce · #215
  1. 1

    A slice bound to a $ or sigilless name is the List of those elements' containers: a write through it lands in the array or hash, and @a = … leaves it the elements it had.

    my \x = @a[0, 2] is (10 30), and my \x = %h<a b> makes no "a b" entry

More from this test: divergences (1).

bson-simple-and-hash-agnosticRaku++ passesRakudo passes2026-08-31 · 2d04edb3
  1. 10

    Assigning to a $ scalar that holds an object with a STORE method replaces what the scalar holds; only a % or @ variable declared is Type routes assignment to that type's STORE.

  2. 11

    Binding a hash element to a value (%p<a> := 137) makes that element immutable, while binding it to a variable aliases the variable's container.

    after %p<a> := 137, %p<a> = 666 fails

  3. 12

    An alias bound to an array element survives a push on the array, and after a splice removes the element the alias keeps the value it named.

    my @b = 1, 2, 3; my $x := @b[1]; @b.push(9); $x = 5 leaves @b as [1, 5, 3, 9]

  4. 14

    An anonymous my % is Type = … applies its container trait, so the type's STORE runs.

More from this test: Dates & times (1), Hashes & sets (1), Modules (1), Classes, roles & the MOP (2), Operators (1), Signatures & dispatch (2), Stringification (1), Strings & Unicode (1), Types & coercion (1).

buf-element-stepRaku++ passesRakudo passes2026-11-08 · 5ae92da8
  1. 1

    ++ on a Buf's element steps it in place, wrapping at the element's width, and a parameter's step reaches the caller's Buf.

    $b[1]++ and $b[0]++ do not die

  2. 2

    Stepping the element one past a Buf's end grows the Buf, while a Blob's element is no container.

buf-write-in-placeRaku++ passesRakudo passes2026-10-28 · 18ef8f73 · #178 · #186
  1. 1

    A Buf's write-* methods write the storage every holder of the Buf shares, as $b[i] = v does.

    after my $c = $b; $c.write-uint16(…), $b shows the write

cell-rebind-and-alias-identityRaku++ passesRakudo passes2026-09-27 · 2251dc2e
  1. 1

    A name bound to a value with := cannot be assigned to but can always be rebound with :=.

    my $r := 42; $r = 1 dies, while my $r := $v +& $m; $r := $r - $m - 1 is legal

  2. 2

    =:= between two array elements compares their containers, so two elements holding equal values are not =:=.

  3. 3

    An element handed out by take-rw is =:= to the slot it came from.

channel-pipe-clone-issues-144-148Raku++ passesRakudo passes2026-10-11 · c87cceb7 · #144
  1. 1

    .clone of an Array held in a scalar is not itemized when assigned to an array.

    my @b = $a.clone has the Array's elements, not one element

More from this test: Concurrency (1), I/O & processes (1).

class-range-spaces-set-identity-aliasRaku++ passesRakudo passes2026-08-20 · f730e79e
  1. 4

    for aliases the elements of an array named in its list, whether written @a or slipped as |@a, so assigning to the topic changes the array.

More from this test: Operators (1), Regexes & grammars (1), Syntax & parsing (1).

clone-semanticsRaku++ passesRakudo passes2026-09-02 · ecdadbad
  1. 1

    Cloning a Pair gives an independent Pair: assigning to the clone's .value does not change the original.

    $p.clone.value = 7 leaves $p unchanged

More from this test: Classes, roles & the MOP (4), Operators (1), Scoping & phasers (1).

codegen-captured-container-and-autovivRaku++ passesRakudo passes2026-07-28 · 6416aec0 · #8
  1. 2

    .push, .append, .unshift or .prepend on a not-yet-existing array element autovivifies that element.

    @ready[2].push(10) leaves @ready[2] holding 10

compound-assign-typecheckRaku++ passesRakudo passes2026-09-29 · a7e6e56d
  1. 1

    A compound assignment to a type-constrained $ variable is checked as = is: a result of the wrong type dies with X::TypeCheck::Assignment and the variable keeps its value.

    my Int $e = 5; $e /= 1 dies with X::TypeCheck::Assignment and $e is still 5

  2. 3

    A compound assignment to a variable with a where constraint runs the constraint on the result.

More from this test: Types & coercion (1).

conformance-phase2-introspectionRaku++ passesRakudo passes2026-07-25 · 5103b4d7
  1. 4

    is default(v) supplies the value of a missing Hash key as well as of a missing Array index.

More from this test: Exceptions & control flow (2), Hashes & sets (1), I/O & processes (1), Classes, roles & the MOP (1), Scoping & phasers (1), Signatures & dispatch (2), Types & coercion (1).

container-class-survives-its-initialiserRaku++ passesRakudo passes2026-09-15 · 6b733a6f
  1. 1

    my %h is MyHash = … declares the variable to be a MyHash; the initializer replaces its contents, not the container.

    after my %h is MyHash = …, %h ~~ MyHash is True

container-lists-and-pair-cellsRaku++ passesRakudo passes2026-09-27 · a77dd764
  1. 1

    A Capture literal's $x part is $x's container, so a write through the Capture's element changes the variable.

    \($a)[0]++ steps $a

  2. 3

    $y := :$y binds $y to a Pair holding $y's former value, not to a Pair that contains itself.

  3. 4

    $k => $v holds $v's container as the Pair's value.

  4. 6

    A Pair built over a name bound to a value (a readonly parameter, my $x := 42) holds the value read-only, and an attribute initialized from that Pair's value is still assignable.

    after C.new(q => $v) with a readonly $v, the attribute can be assigned

More from this test: Hashes & sets (1), Signatures & dispatch (1).

container-store-initializeRaku++ passesRakudo passes2026-09-13 · 371ec761
  1. 1

    my %h is MyContainer = @pairs passes :INITIALIZE to the container's STORE on the declaration's own assignment and on no later assignment.

corpus-batch-1Raku++ passesRakudo passes2026-07-22 · c9beb901
  1. 2

    Assigning an undefined value of a non-matching type to a typed scalar dies with X::TypeCheck::Assignment, while the matching type object, Nil and a Failure are accepted.

    my Int $i = $u with $u holding Any dies

More from this test: Numerics (1).

cro-core-clusterRaku++ passesRakudo passes2026-08-06 · 9c84434c
  1. 2

    A sigilless name bound to an array is the array itself, not an itemized scalar, so flat flattens it.

    with my \d = @x holding 1 and 2, flat(d, 3, d).join(',') is 1,2,3,1,2

More from this test: Concurrency (4), Classes, roles & the MOP (2), Regexes & grammars (1), Scoping & phasers (1).

cro-live-clusterRaku++ passesRakudo passes2026-07-23 · 3c1b7a9e
  1. 7

    my (:@a, :@b) := %h destructures a hash by name into the declared variables.

More from this test: Modules (1), Classes, roles & the MOP (2), Scoping & phasers (1), Signatures & dispatch (1), Syntax & parsing (2).

custom-iterator-protocolRaku++ passesRakudo passes2026-07-26 · ba5c5af5
  1. 3

    my @a := SubclassOfArray.new binds the object itself, keeping its class and the methods the subclass adds.

More from this test: Lists & laziness (5).

dbdish-native-and-list-defectsRaku++ passesRakudo passes2026-08-25 · 5faed01f · #28
  1. 7

    An itemized array can be bound to an @ variable or parameter. inferred

  2. 12

    Assigning to a variable whose container class defines STORE calls that STORE. inferred

More from this test: Lists & laziness (1), Native types & NativeCall (5), Classes, roles & the MOP (3), Regexes & grammars (3), Signatures & dispatch (1), Syntax & parsing (2).

decl-type-compiledRaku++ passesRakudo passes2026-07-28 · ccc187ec
  1. 2

    An uninitialized my Int $x holds the type object (Int), not (Any).

deref-subscript-lvalueRaku++ passesRakudo passes2026-10-03 · 72e93f3c · #122
  1. 1

    An element reached through @$h[…] or %$h<…> is assignable and is the same element as $h[…].

    @$h[0] = 5 and @$h[1]++ write into the array $h holds

  2. 2

    When $h does not hold an Array (or Hash), @$h (or %$h) is a fresh value and its elements are not assignable.

digest-bigint-and-native-clusterRaku++ passesRakudo passes2026-08-05 · efed6ddf
  1. 4

    A compound assignment or a range-slice assignment to buffer elements writes in place and keeps the buffer a Buf.

    my buf8 $state .= new: 0 xx 8; $state[3] +^= 0x06 leaves $state[3] at 6

More from this test: Operators (1), Signatures & dispatch (3).

digest-native-widths-clusterRaku++ passesRakudo passes2026-08-03 · cc0f34e5
  1. 3

    A type written before a parenthesised declaration list applies to every variable in the list.

    my uint32 ($a, $b) = 0xFFFFFFFF + 5, 7 gives (4, 7)

  2. 4

    $buf[i] = v writes into the buffer, truncating to the element width and growing with zeroes, while assigning to an element of a Blob dies.

    my buf8 $b .= new(1,2,3); $b[1] = 300 leaves (1, 44, 3)

More from this test: Lists & laziness (2), Numerics (4), Operators (2), Scoping & phasers (1).

dot-assign-itemizes-into-scalarRaku++ passesRakudo passes2026-11-13 · 1c4da191 · rakudo#3621
  1. 1

    .= into a $ variable itemizes what it stores, as = does.

    after $x .= split(','), $x.raku shows $(…) and for $x sees one item

duration-slip-fail-destructureRaku++ passesRakudo cannot run it2026-10-22 · 3e97932e
  1. 5

    A destructuring my ($a, $b) = ITEM with a single right-hand item iterates it, itemized or not, and a Hash gives its pairs.

    my ($k, $v) = %h puts pairs of %h in $k and $v

    Also held by exe-nfc-join-and-destructure.

More from this test: Dates & times (2), Exceptions & control flow (1), Lists & laziness (2).

dynamic-method-lvalueRaku++ passesRakudo passes2026-09-17 · 034ba7d6
  1. 1

    A dynamic method call $obj."$name"() = $value is an assignment target that writes through the rw accessor, and an @ or % attribute reached that way takes a list assignment.

    $h."{$a<name>.lc}"() = ~$a<value> sets the attribute

ecosweep-900-batchRaku++ passesRakudo passes2026-09-09 · 063a5a1a
  1. 7

    $!attr := $rw-param binds the attribute to the caller's container.

More from this test: I/O & processes (1), Lists & laziness (4), Numerics (1), Operators (2), Regexes & grammars (1), Signatures & dispatch (2), Stringification (1), Syntax & parsing (1).

element-alias-nil-resetsRaku++ passesRakudo passes2026-11-09 · 649cb2b1
  1. 1

    Assigning Nil through a := alias of an untyped Array element or Hash value resets that element to Any.

    after my @p = 1, 2; my $e := @p[0]; $e = Nil, @p[0] is Any, not Nil

element-binds-the-containerRaku++ passesRakudo passes2026-09-15 · e1b41314
  1. 1

    %h<k> := $a binds the element to $a's container, so a later write to $a is seen through the hash.

empty-block-is-nilRaku++ passesRakudo passes2026-09-04 · 0272cd9a
  1. 2

    The declaration my $x; evaluates to an undefined Any, not Nil.

More from this test: Exceptions & control flow (1).

exception-messages-and-mop-mutatorsRaku++ passesRakudo passes2026-07-27 · c0e8233a
  1. 5

    Binding a string literal to a typed variable fails the type check whether the literal is single- or double-quoted.

    my Int $x := "foo" throws just as my Int $x := 'foo' does

More from this test: Exceptions & control flow (4), Classes, roles & the MOP (2).

exe-accessor-assignRaku++ passesRakudo passes2026-11-11 · 4d6ad00d
  1. 3

    An Array's .tail and .head and an is rw method are assignable. inferred

    @s.tail = … and @a.head = … assign

More from this test: Classes, roles & the MOP (1).

exe-buf-whatever-index-nativeRaku++ passesRakudo passes2026-11-11 · 8913094c · #163
  1. 2

    $b[*-1] on a Buf or Blob reads the last element, and a store or op= through $b[*-1] on a Buf writes the last element.

    my $b = Buf.new(1, 2, 3); say $b[*-1] is 3

exe-mechanical-nativeRaku++ passesRakudo passes2026-11-20 · ef8f4453
  1. 8

    my $x := 1, 2 binds the list without itemizing it.

More from this test: Exceptions & control flow (2), Classes, roles & the MOP (1), Scoping & phasers (1), Signatures & dispatch (3).

exe-module-buf-and-bind-issues-160-161-200Raku++ passesRakudo passes2026-11-11 · ca60fcc7 · #161 · #200
  1. 2

    An element store into a Buf held in a $ variable changes that byte and leaves the variable a Buf.

    my $b = Buf.new(1,2,3); $b[0] = 9 does not make $b an Array

    Also held by issue-161-exe-buf-element-store-in-routine.

  2. 3

    my @a := f()[0] binds @a to the element itself, not to a one-element list wrapping it.

    with aoa() returning an array of arrays, my @a := aoa()[0] gives @a the inner array's elements

exe-pair-containers-through-a-moduleRaku++ passesRakudo passes2026-11-12 · c31bc9eb · #255
  1. 2

    A hash element bound to a variable with %h{$k} := $var is written through to that variable by a later %h{$k} = $v.

exe-pair-key-and-adverbsRaku++ passesRakudo passes2026-11-11 · cf7816b6
  1. 3

    .dynamic asks the variable, not its value.

    my @c is dynamic; @c.dynamic is True

More from this test: Hashes & sets (1), Types & coercion (1).

exe-required-and-attributive-paramsRaku++ passesRakudo passes2026-10-18 · 87624125
  1. 3

    $!t = Nil resets the attribute to its default: Any, or a typed attribute's type object.

More from this test: Classes, roles & the MOP (1).

exe-scalar-store-nil-and-typeRaku++ passesRakudo cannot run it2026-10-22 · 3e97932e
  1. 1

    Assigning Nil to a $ container resets it to its default, and my @a = Nil holds one default element.

    my $r = try die "x" holds Any, and my @a = Nil is [Any]

  2. 2

    A typed $ container type-checks every assignment, and Nil assigned to it restores the type's default rather than staying Nil.

    my Int $x; $x = "a" dies

exe-value-semanticsRaku++ passesRakudo passes2026-11-11 · 090426b0
  1. 6

    A hash element is a Scalar container, so %h<k> = @x stores the array as one item.

    after %h<k> = @x, my @i = %h<k> has one element

More from this test: Hashes & sets (2), Lists & laziness (1), Regexes & grammars (1), Signatures & dispatch (1), Types & coercion (1).

fallback-nil-and-slicesRaku++ passesRakudo passes2026-07-31 · e1679c33
  1. 4

    Slice assignment distributes the right-hand side one level deep, so a nested list on the right is assigned whole to one slot.

    @a[0..2] = ([1,2],[3,4],Nil) puts [1,2] in one element

  2. 5

    Nil stored into a container element restores that element's default.

More from this test: Lists & laziness (1), Classes, roles & the MOP (1), Syntax & parsing (1).

first-topic-aliases-elementRaku++ passesRakudo passes2026-11-09 · ba6f7edf
  1. 1

    The $_ of a .first block on an Array is the element itself, so an assignment to it writes the element and the element is what .first returns.

    @a.first({ $_ = 9; True }) writes 9 into the element and answers 9

  2. 2

    A typed Array's element written through the $_ of a .first block is type-checked against the element type.

float-exe-reportRaku++ passesRakudo passes2026-10-16 · 48223469
  1. 2

    A Failure assigned to a native variable is refused with the unbox error instead of being stored as a number.

    my num $r = 1e0 / $zero dies rather than becoming 2

for-immutable-topicRaku++ passesRakudo passes2026-09-20 · 87378aa7
  1. 1

    Assigning to a topic bound raw to a value with no container, such as the $_ of for 1..3 or an is raw parameter, dies with "Cannot assign to an immutable value".

    for 1..3 { $_ = 9 } dies with Cannot assign to an immutable value

  2. 2

    Assigning to a readonly container such as a plain -> $i loop variable dies with "Cannot assign to a readonly variable or a value", a different message from the immutable-value one.

More from this test: divergences (1).

for-over-itemized-empty-arrayRaku++ passesRakudo passes2026-11-11 · ca60fcc7 · #97
  1. 2

    A for over an itemized Array, List or [] in a scalar hands the loop the container itself, whose .raku keeps the $.

for-over-pod-variableRaku++ passesRakudo passes2026-11-09 · 3d4a3a91 · #97
  1. 1

    for $=pod iterates the pod blocks one at a time, because $=pod is bound without a Scalar container.

  2. 2

    A $ variable holding an Array is one item to a for loop.

    my $a = Array.new; for $a -> $i { ... } runs once

    Also held by for-over-itemized-empty-array.

for-over-slice-aliasesRaku++ passesRakudo passes2026-10-19 · 9550aecc
  1. 1

    for over an array or hash slice hands out the element containers, so a write through the topic or an is rw parameter changes the element.

    $_ *= 10 for @a[^2] changes @a; for @a[^2] -> $x is rw { $x = 0 } too

More from this test: Operators (1), divergences (1).

for-values-view-aliasesRaku++ passesRakudo passes2026-09-20 · 54d2ee02
  1. 1

    @a.values and @a.list are views of the array, so a for over one hands the loop each element's own container and a write through the topic lands in the array.

    for @a.values { $_ = 9 } sets every element of @a to 9

  2. 2

    A for loop's plain pointy-block variable -> $i is a readonly parameter, so assigning to it dies; $_ and <-> are the aliasing forms.

    for %h.values -> $v { $v = 9 } is refused

    Also held by for-loop-var-is-readonly.

getopt-long-parameter-traitsRaku++ passesRakudo passes2026-08-30 · 5e23726e
  1. 6

    A Pair written KEY => my $x carries the variable's container, so assigning through the Pair's .value changes $x.

More from this test: Lists & laziness (1), Classes, roles & the MOP (2), Signatures & dispatch (2), Stringification (1), Types & coercion (1), divergences (1).

grand-review-c1-interpRaku++ passesRakudo passes2026-09-06 · fa74f74f
  1. 13

    An unassigned element of an array declared is default(V) reads as V.

More from this test: Exceptions & control flow (3), I/O & processes (1), Numerics (7), Operators (4), Scoping & phasers (4), Signatures & dispatch (3), Stringification (1), Strings & Unicode (1).

hash-classify-list-and-defaultsRaku++ passesRakudo passes2026-07-26 · f78b6251
  1. 3

    my %h is default(1) = … keeps its element default after the assignment: .default reports it and a missing key gives it.

More from this test: Hashes & sets (2).

hash-map-pair-semantics-sheetRaku++ passesRakudo passes2026-09-20 · ed688ad6
  1. 9

    Assigning Nil to an element of a typed hash stores the element type object. inferred

    my Int %h = a => 1; %h<a> = Nil; %h.raku is (my Int % = :a(Int))

  2. 16

    A % variable bound to a Map refuses a list assignment with X::Assignment::RO, while a Map assigned into a Hash variable gives a writable Hash. inferred

    my %h := Map.new((a => 1)); %h = (b => 1) throws X::Assignment::RO

  3. 22

    A Pair binds its value: a literal or computed value is read-only (assigning to .value throws X::Assignment::RO), a variable's container stays writable through .value, and the key is never writable. inferred

    my $p = (a => 1); $p.value = 5 throws X::Assignment::RO; my $p = (a => $x); $p.value = 5 works

More from this test: Hashes & sets (13), Operators (4), Stringification (5), Types & coercion (1).

hash-values-map-rw-paramRaku++ passesRakudo passes2026-11-09 · 07e940ce
  1. 1

    %h.values.map and .grep bind an is rw, raw or \x parameter to the hash's own value container, while a plain parameter stays a copy.

    %h.values.map(-> $v is rw { $v++ }) increments %h's values

More from this test: Hashes & sets (1).

huge-array-index-refusedRaku++ passesRakudo passes2026-11-12 · 147d0b95 · rakudo#5835
  1. 1

    A write to an array index no machine could reach is refused with "Unable to allocate an array of N elements" (X::AdHoc) before anything grows — by assignment, .ASSIGN-POS, .BIND-POS, a slice, a := bind or a nested [0][i].

    my $b; $b[1e18] = "meow" is refused

immutable-step-and-vivifyRaku++ passesRakudo passes2026-10-08 · 5db9e33a
  1. 1

    ++ or -- on an element of a Pair, a List or a Range throws X::Multi::NoMatch, because the operator binds its argument is rw, while = on such an element throws X::Assignment::RO.

    (a => 1)<a>++ and (1, 2)[0]++ throw X::Multi::NoMatch; (a => 1)<a> = 9 throws X::Assignment::RO

issue-174-native-buffer-through-flatteningRaku++ passesRakudo passes2026-10-18 · 8e82287e · #174
  1. 2

    A Buf is a reference type: every copy of the value shares one buffer, and .clone makes a second buffer.

More from this test: Native types & NativeCall (1).

issue-183-native-array-element-type-checkRaku++ passesRakudo passes2026-11-11 · ca60fcc7 · #183
  1. 1

    An element store into a native array is type-checked, for a single-quoted and a double-quoted string alike.

    my int @array = 1, 2, 3; @array[1] = 'foo' is refused

issue-184-aliased-element-typeRaku++ passesRakudo passes2026-10-28 · 17e33a45 · #184
  1. 1

    Every alias of a typed array's element (:=, a sigilless name, an is rw or sigilless parameter, a for loop's $_ or <-> variable, given's topic, .map's $_) refuses what the element type refuses, answers the type from .VAR.of, and resets the element to its default on Nil.

    my Int @a = 1, 2, 3; my $e := @a[1]; $e = 'foo' dies, and $e.VAR.of is (Int)

More from this test: divergences (1).

issue-185-andthen-topic-containerRaku++ passesRakudo passes2026-10-20 · 4af50b85 · #185
  1. 1

    The $_ on the right side of andthen, orelse and notandthen is bound to the left side's container (a variable, an array or hash element), so writing to it writes the left side.

    @a[0] andthen $_ = 2 assigns @a[0]

  2. 2

    Whether = is item or list assignment is chosen by the sigil of the expression's first variable (@ once a postfix applied), not by the ='s own left side.

    @a[0] andthen $_ = 2, 3, 4 assigns the whole (2, 3, 4); $y and @b = 1, 2 assigns only the 1

  3. 3

    Parentheses, a ternary's middle, a call's arguments and a declaration's initializer each start an expression of their own for the choice between item and list assignment.

  4. 4

    with @a[EXPR] { … } evaluates the subscript once and binds $_ to that element's container.

    with @a[$i++] { $_ = 5 } steps $i once and writes the element it tested

  5. 5

    Assigning to $_ inside with $p { … } dies when $p is a readonly parameter.

    with $p { $_ = 5 } on a readonly parameter dies

issue-68-multidim-endless-rangeRaku++ passesRakudo times out2026-09-06 · abd3d115 · #68
  1. 3

    Assignment to a multidimensional slice is a list assignment that distributes the values over the selected elements.

    @a[0..*; 1] = 7, 8, 9, 10 stores one value per row

More from this test: Lists & laziness (2), divergences (2).

issue35-zef-after-installRaku++ passesRakudo cannot run it2026-10-07 · 808e24eb · #35
  1. 6

    A $ name bound with := to a list has no item container, so for $x { … } iterates the list's elements.

    my $x := <value>; for $x { … } iterates the list instead of running once

More from this test: Hashes & sets (1), I/O & processes (1), Lists & laziness (1), Modules (1), Types & coercion (1).

issue37-fez-zef-installRaku++ passesRakudo cannot run it2026-08-27 · c63eb77a · #37
  1. 5

    Assigning Nil to a typed array gives one element holding the default.

    my Bool @results = Nil has one element, so ?@results is True

More from this test: Modules (3), Regexes & grammars (1), Syntax & parsing (2), Types & coercion (1).

issue63-typed-container-elementsRaku++ passesRakudo passes2026-09-03 · 2461384d · #63
  1. 1

    A typed array, whether an attribute like has Str @.data or a lexical, type-checks every element that enters it and dies on a mismatch.

    storing an Int in has Str @.data dies with Type check failed for an element of @!data

  2. 2

    .of on a typed array attribute answers the declared element type.

More from this test: Classes, roles & the MOP (1).

itemization-and-list-foldsRaku++ passesRakudo passes2026-07-26 · 0ccec43d
  1. 1

    A $ variable itemizes the list it stores, so it does not flatten into a later list.

    after my $t = (1,2), my @b = $t has one element

More from this test: Lists & laziness (3), Numerics (1), Operators (2), Regexes & grammars (1), Stringification (1).

itemized-argument-is-one-itemRaku++ passesRakudo passes2026-10-08 · 425d70df
  1. 5

    A List holds the containers of Array and Hash elements written in it ((@a[0], 2), (%h<k>, 2)): a write through the List reaches the element, and after a later .shift or :delete the List still holds the container it had.

    Also held by list-holds-variable-containers.

  2. 6

    A List pushed, unshifted or stored into an array element (@o.push(($w, 0)), @o[0] = ($w, 0)) keeps the containers of the variables in it.

    Also held by list-holds-variable-containers.

More from this test: Lists & laziness (3), Operators (1).

itemized-range-stays-oneRaku++ passesRakudo passes2026-11-08 · 21111219
  1. 2

    A Range inside the list a destructuring assignment takes is one value, itemized or not, while a Range alone spreads.

    my ($a, $b, $c) = (1..2), 3 gives $a 1..2

More from this test: Lists & laziness (1).

itemized-storesRaku++ passesRakudo passes2026-10-19 · 9550aecc
  1. 1

    A store into a $ variable or a hash or array element keeps a List, Array or Hash as one item, for plain = and also for //=, ||=, .push of a Hash onto a new key and a Hash() append merge.

    after %h<a> //= … with a list, my @a = %h<a> has one element

iterable-object-and-named-subsigRaku++ passesRakudo passes2026-08-05 · 921e38c7
  1. 2

    Assigning an object that does Iterable to an @ container iterates it.

More from this test: Lists & laziness (2), Signatures & dispatch (1).

js-backend-fixes-2026-10-11Raku++ passesRakudo passes2026-10-11 · 33d25fb9
  1. 3

    A list assignment to a parenthesized declaration iterates a single item on its right side: my ($p, $q, $r) = @bands[1] and my ($s, $t) = $item unpack the element. inferred

    my $item = (5, 6); my ($s, $t) = $item gives 5 and 6

  2. 4

    Assigning to an open-ended slice @a[1..*] writes only the existing elements and drops values that do not fit. inferred

    my @w = 1, 20, 30, 40; @w[2..*] = 7, 8, 9, 10 leaves [1, 20, 7, 8]

More from this test: Lists & laziness (2), Operators (1).

json-fast-clusterRaku++ passesRakudo does not pass2026-08-05 · ddc75ad1
  1. 10

    A ternary is an lvalue over the branch it picks.

    (True ?? $x !! $y) = 9 sets $x to 9

More from this test: Numerics (1), Operators (1), Signatures & dispatch (1), Strings & Unicode (1), Types & coercion (6).

kept-list-typed-writesRaku++ passesRakudo cannot run it2026-10-23 · e30e2827
  1. 1

    A write through a kept List's element into a typed variable is checked as = into the variable is: a wrong type dies with X::TypeCheck::Assignment and leaves the variable, and a Nil resets it to its default.

    my Int $a; sub f($x) { $x[0] = "s" }; f(($a, 2)) dies X::TypeCheck::Assignment

list-array-semantics-sheetRaku++ passesRakudo passes2026-09-19 · 1e36359f
  1. 6

    A hole in an is default array reads as the default in a subscript, in .raku, in join and in shift, and trailing deletes still shrink the array. inferred

    my @a is default(7); @a[2] = 1; @a.raku is [7, 7, 1]

  2. 7

    .name on an array variable answers the variable's name. inferred

    (my @named).name is @named

  3. 8

    A shaped array's .raku names its shape, an index outside the shape throws, and a Range is not a valid :shape. inferred

    my @a[2]; @a[0] = 1; @a.raku is Array.new(:shape(2,), [1, Any])

  4. 15

    Assigning a Set or a Hash to an array stores its pairs, and append spreads a Hash into its pairs. inferred

    (my @s = set(1)).raku is [1 => Bool::True]

  5. 16

    @a[*] = … is a slice assignment over the existing indices: extra values are dropped and missing ones store Any, while the zen slice @a[] = … replaces the array's contents. inferred

    my @a = 1, 2, 3; @a[*] = 0 leaves [0, Any, Any]; @a[] = 5, 6 leaves [5, 6]

  6. 18

    @a.map(* *= 2) writes through to the array's elements, and .first on an array answers an assignable element. inferred

    my @a = 1, 2, 3; @a.first = 9 leaves [9, 2, 3]

  7. 23

    In a list declaration an inner list on the right is one destructured value for a scalar target, while a % target still takes the pairs. inferred

    my ($a, $b, $c) = (1, 2), 3 gives ($(1, 2), 3, Any)

More from this test: Exceptions & control flow (1), Lists & laziness (11), Stringification (3), Types & coercion (2).

list-assign-checks-typed-scalarRaku++ passesRakudo passes2026-11-09 · 73940d6e
  1. 1

    A list assignment into previously declared variables checks each target as a plain $x = v does: its nominal type, its :D smiley, its where clause and its coercion type.

    my Int $a = 1; ($a, $z) = "la", 2 is refused; my Int() $c assigned "5" in a list assignment holds the coerced value

list-assign-keeps-inner-list-wholeRaku++ passesRakudo passes2026-11-11 · ca60fcc7 · #103
  1. 1

    In a list assignment to a declaration list of scalars, a List on the right-hand side is one item, not a Slip, so one variable takes it whole.

    my ($a, $b, $c) = (@x.List, 'T', 'U') gives $a the whole List

list-constant-nativeRaku++ passesRakudo passes2026-11-08 · 84afd3c1
  1. 1

    A constant @L keeps a Positional initializer's kind (a List, an Array, a Range), caches a Seq into a List, and makes anything else a one-element List.

    constant @L = (2, 4) is a List

list-holds-variable-containersRaku++ passesRakudo passes2026-10-08 · 5db9e33a
  1. 4

    Binding into an element of a List throws X::Bind.

  2. 5

    Reading a container-holding List whole — blob8.new($m), %($m), |$m — gives its values.

list-literal-item-typed-assignRaku++ passesRakudo passes2026-11-09 · d5186165
  1. 1

    An assignment through a subscript of a list literal that holds a variable is checked against that variable's type, :D smiley and coercion type, as $a = v is.

    my Int $a; ($a, 2)[0] = "l" dies "Type check failed in assignment to $a"

  2. 2

    Assigning Nil through a subscript of a list literal that holds a variable resets the variable to its default: its type object or its is default value.

    my Int $a; ($a, 2)[0] = Nil leaves $a as (Int)

map-rw-param-binds-elementRaku++ passesRakudo passes2026-11-08 · 0579b6c2
  1. 1

    An is rw, raw or \x parameter of the block or routine .map calls is bound to the Array's element, each parameter of a chunk to its own, while a plain or is copy one is a copy.

    sub inc($x is rw) { $x++ }; @a.map(&inc) and @a.map(&postfix:<++>) increment @a's elements

method-call-shapes-and-core-tablesRaku++ passesRakudo passes2026-10-04 · 1ae46f02
  1. 10

    %h.STORE(…) and @a.STORE(…) replace the container's contents in place.

More from this test: Numerics (1), Classes, roles & the MOP (9), Operators (1), Strings & Unicode (1), Syntax & parsing (2).

mu-roles-and-itemizationRaku++ passesRakudo passes2026-07-26 · fa75abec
  1. 3

    .item and the item(…) sub itemize a Hash as well as an Array.

More from this test: Classes, roles & the MOP (3), Stringification (1).

my-redeclare-keeps-containerRaku++ passesRakudo passes2026-09-11 · 288ed33c
  1. 1

    A second my $x in the same scope is the same variable, so a name already bound to its container keeps seeing it.

    my $x = 2; my $y := $x; my $x = 3 leaves $y at 3

  2. 2

    Rebinding a variable with := leaves an earlier alias of it on the old container.

native-array-elementsRaku++ passesRakudo passes2026-11-06 · a1706cb7
  1. 2

    A native array's element is boxed when copied into a container (an Array, a scalar, a hash, a push, the […] composer), by .pop and .shift, and by arithmetic on it; a List literal keeps it native.

More from this test: Signatures & dispatch (2).

native-array-grown-stays-packedRaku++ passesRakudo passes2026-11-05 · fb43011a
  1. 2

    Assigning past the end of a native int or num array fills the gap with 0 (0e0).

native-param-refuses-kindRaku++ passesRakudo passes2026-10-15 · b7c47a57
  1. 4

    my int $x = 1.5e0 is refused with the same unbox error and wording as a Num or Rat bound to an int parameter.

More from this test: Signatures & dispatch (3).

native-return-value-is-not-a-containerRaku++ passesRakudo passes2026-10-12 · 7e42ac3e
  1. 1

    A value a routine returns out of a native variable is a plain value: binding it with := does not turn the bound name into a native slot.

    after $v := f() with f returning a native int, $v := [7, 8] binds the Array, not 2

native-typed-sub-lean-and-loop-kernelRaku++ passesRakudo cannot run it2026-10-22 · 3e97932e
  1. 2

    A List kept from a literal holds its variables' containers, so assigning through one of its elements writes the variable.

    after f(($a, 2)), the callee writing $x[0] assigns $a instead of dying "Cannot modify an immutable List"

    Also held by exe-kept-list-writes.

nested-list-assign-flattensRaku++ passesRakudo passes2026-10-19 · 9550aecc
  1. 1

    A nested list on the left of a plain assignment is flattened one level into a list of containers rather than destructuring its value; only a my (…) declaration destructures.

nested-list-container-stringifiesRaku++ passesRakudo passes2026-10-08 · 5ccae330
  1. 2

    A List made from a literal holds the containers of the variables in it, so an assignment to such an element writes the variable, while a plain value element refuses the write.

    ($x, 6) sees later assignments to $x

    Also held by list-holds-variable-containers.

More from this test: Stringification (1).

nil-binds-and-resetsRaku++ passesRakudo passes2026-10-09 · 6acb4326
  1. 1

    my \x = Nil and constant c = Nil bind, so the name is Nil itself, not Any.

  2. 2

    In a list assignment a Nil on the right resets the target container to its default instead of being stored or type-checked.

    my ($a, $b) = Nil, 5 does not leave Nil in $a; my Int ($a) = Nil does not die

  3. 3

    In a list assignment each element of an @ target is a container that Nil resets, and a % target is stored into as my %h = … is, an odd number of items being an error.

nqp-iterator-buffer-and-bindattrRaku++ passesRakudo passes2026-09-11 · 6d82fac4
  1. 2

    An attribute bound with nqp::bindattr from a parameter can be rebound later; it does not inherit the parameter's read-only status.

More from this test: Lists & laziness (1), Types & coercion (1).

op-assign-element-refusal-nameRaku++ passesRakudo passes2026-11-09 · e56816cc
  1. 1

    A type-check failure from an arithmetic or string OP= on a typed element names the container, not the subscripted element.

    my Int @a = 1; @a[0] ~= "x" says "for an element of @a"; a typed Hash's %h<a> ~= "x" says "of %h"

  2. 2

    A type-check failure from //=, ||= or &&= on a typed element names the element with its subscript.

open-modes-bind-end-shiftRaku++ passesRakudo cannot run it2026-07-30 · bbf7c862
  1. 2

    A positional list declaration can be bound with :=, as in my ($a, $b) := ....

    my (&tempfile, &tempdir) := '...'.EVAL binds both

More from this test: I/O & processes (1), Scoping & phasers (1), Syntax & parsing (1).

packed-array-copyRaku++ passesRakudo passes2026-10-24 · 7fcca8a8
  1. 2

    my num @c = @b makes an independent copy: a store into either array leaves the other alone.

packed-computed-keyRaku++ passesRakudo passes2026-10-24 · 5e5d80ec · #187
  1. 2

    A subscript's key is evaluated once.

    a key with an effect, $k++ + 1, steps $k once

    Also held by carray-index-once, subscript-key-evaluated-once.

pair-and-list-are-immutableRaku++ passesRakudo passes2026-09-08 · 1497afb9 · #69
  1. 1

    Assigning to a Pair through a subscript throws X::Assignment::RO, whether the Pair holds a literal or a container.

    (a => 1)<a> = 9 throws X::Assignment::RO

  2. 2

    :delete on a Pair or on a List throws X::AdHoc.

    (a => 1)<a>:delete throws

  3. 4

    Binding a variable to a Pair's subscript (my $r := $p<key>) leaves the Pair intact; it does not autovivify a Hash over it.

More from this test: Types & coercion (1).

pair-subscript-nativeRaku++ passesRakudo passes2026-10-08 · e9e11f91
  1. 3

    Assigning through a subscript of a Pair, $p<a> = 9, throws X::Assignment::RO.

More from this test: Hashes & sets (1), Signatures & dispatch (1).

param-container-nameRaku++ passesRakudo passes2026-11-02 · 42618157
  1. 1

    .VAR.name on an @ or % parameter names the container bound to it: the caller's variable name, or "element" when it is bound to an anonymous [], a default, a copy, a slurpy or nothing.

    a parameter bound to the caller's my @x answers "@x" for @p.VAR.name

parameterized-decl-bind-posRaku++ passesRakudo passes2026-08-30 · 38a0d900 · #47
  1. 2

    BIND-POS stores the container it is given, so the slot becomes an alias: reading it fetches through, and binding from it passes the same container on.

More from this test: Operators (1), Types & coercion (1).

params-refuse-what-sigil-refusesRaku++ passesRakudo passes2026-11-08 · 0ca4968e
  1. 5

    my %h := (a => 1) binds the Pair itself.

More from this test: Compile-time errors (1), Signatures & dispatch (4).

pdf-family-2026-09Raku++ passesRakudo passes2026-09-14 · a3586267
  1. 29

    An assignment to a Proxy is worth what FETCH answers afterwards, not what STORE returned.

  2. 33

    Assigning Nil to a subset-typed attribute resets it to its default rather than failing the type check.

  3. 40

    my $v := $p.value binds the Pair's value container, also when the Pair comes through a do block.

  4. 42

    $obj<k> = v on a user Associative is worth what the container holds after the store, not the right-hand side.

  5. 43

    $obj<k>++ on a user Associative goes through ASSIGN-KEY.

  6. 44

    Subscripting a Proxy handed back by an is rw method reaches the value the Proxy holds.

  7. 48

    An overriding is rw AT-POS/AT-KEY that calls callsame yields a container that can be assigned to.

  8. 54

    A native-typed array is a container and may be bound to another array variable.

More from this test: Exceptions & control flow (1), I/O & processes (1), Lists & laziness (1), Modules (1), Numerics (1), Classes, roles & the MOP (14), Operators (1), Regexes & grammars (3), Scoping & phasers (4), Signatures & dispatch (9), Syntax & parsing (11), Types & coercion (3).

process-stash-computed-keyRaku++ passesRakudo passes2026-08-05 · 96b8030c
  1. 2

    := binds even when its right-hand side is a value with no container behind it.

More from this test: Scoping & phasers (1).

proxy-returned-by-call-fetched-onceRaku++ passesRakudo passes2026-11-25 · a10df015 · #281
  1. 1

    Assigning what a call returns reads a Proxy once, at the assignment; later reads of the variable do not run FETCH again.

    my $a = $obj.m, where method m() is rw returns a Proxy, runs FETCH once

    Also held by proxy-fetch.

rakudo-t-language-gaps-1Raku++ passesRakudo passes2026-10-05 · 892e6c61
  1. 8

    .= through an element handed out by take-rw stores into the original.

More from this test: Compile-time errors (1), Lists & laziness (1), Classes, roles & the MOP (2), Operators (1), Everything else (1), Regexes & grammars (2), Scoping & phasers (2), Signatures & dispatch (1), Stringification (2), Strings & Unicode (1), Syntax & parsing (1).

rakudo-t-language-gaps-3Raku++ passesRakudo passes2026-10-05 · be813251
  1. 7

    A refused element assignment does not grow the array.

More from this test: Compile-time errors (2), Lists & laziness (2), Modules (1), Classes, roles & the MOP (1), Operators (2), Regexes & grammars (1), Scoping & phasers (1), Signatures & dispatch (1), Stringification (1), Syntax & parsing (1).

rakuglaze-round-5Raku++ passesRakudo passes2026-10-03 · 60477ffd
  1. 4

    In an assignment, the subscript key on the left is evaluated before a right-hand side that changes what the key reads.

More from this test: Concurrency (1), Lists & laziness (1), Scoping & phasers (1), Types & coercion (1).

recursion-failure-and-match-derefRaku++ passesRakudo passes2026-08-20 · e06e5992
  1. 2

    Assigning a Failure to a typed container throws it, while an untyped container stores it.

    my Rat $r; try { $r = $s.Rat } sets $! when $s is not a number

More from this test: Regexes & grammars (2).

return-rw-local-not-danglingRaku++ passesRakudo passes2026-09-08 · 0b629666 · #69
  1. 1

    return-rw of a routine-local variable bound to a hash element returns a container whose assignment writes the original structure.

    my $root := $container; $root := $root{$step}; return-rw $root hands back a writable element

roast-last-filesRaku++ passesRakudo passes2026-09-28 · 6e9ef4cc
  1. 5

    A sigilless invocant (\SELF:) is the caller's container, so an is raw AT-POS that returns SELF.substr-rw(…) can be assigned through. inferred

  2. 10

    my @s := @a[1, 2] (or := %h<b c>) binds the elements' containers, so assigning through @s writes the array or hash, one value per container. inferred

    with my @arr = <a b c d>; my @sl := @arr[1, 2], @sl = <A B C D> leaves @arr.join as aABd

More from this test: Compile-time errors (1), Lists & laziness (2), Numerics (3), Classes, roles & the MOP (1), Operators (1), Scoping & phasers (2).

roast-sweep-dispatchRaku++ passesRakudo passes2026-09-28 · 2cc896bd
  1. 8

    An @-sigiled name binds only a Positional: my @a := 1 and binding a Failure throw X::TypeCheck::Binding. inferred

    my @r := 1 is X::TypeCheck::Binding

More from this test: Classes, roles & the MOP (3), Signatures & dispatch (7), divergences (1).

roast-sweep-runtimeRaku++ passesRakudo cannot run it2026-09-28 · 2cc896bd
  1. 7

    push autovivifies an undefined $ variable into an Array. inferred

  2. 25

    A Proxy subclass built by the default constructor is the container itself, reached with .VAR, and keeps its attributes. inferred

More from this test: Compile-time errors (4), Concurrency (2), Exceptions & control flow (2), Hashes & sets (4), I/O & processes (3), Lists & laziness (5), Modules (2), Classes, roles & the MOP (8), Operators (4), Everything else (1), Regexes & grammars (1), Scoping & phasers (14), Stringification (1), Strings & Unicode (1), Types & coercion (3).

rw-chain-keeps-the-intermediate-frame-currentRaku++ passesRakudo passes2026-09-13 · d1a1f89b
  1. 1

    When an is rw parameter is passed on to another routine's is rw parameter, the intermediate routine sees the inner routine's writes, so its own later modification builds on them.

    with c2 incrementing its rw parameter, sub c1($ip is rw) { c2($ip); $ip++ } increments the caller's variable twice

rw-kv-loop-over-derefRaku++ passesRakudo passes2026-10-03 · 72e93f3c · #123
  1. 1

    for @$h.kv -> $i, $x is rw (and %$h.kv) writes through to the container $h holds.

rw-kv-loop-over-scalarRaku++ passesRakudo passes2026-10-03 · 72e93f3c · #123
  1. 1

    for $h.kv -> $k, $v is rw over a scalar holding an Array or Hash writes through to it.

rw-returns-and-container-traitsRaku++ passesRakudo passes2026-08-30 · 9e00135b
  1. 1

    my %h is MyHash (or my @a is MyArray) makes the variable an instance of the named container class.

    my %top is MyH; %top.^name is MyH

  2. 2

    The result of a routine declared is rw or is raw, or returned with return-rw, is a container that can be assigned to.

More from this test: Lists & laziness (1), Stringification (1), Types & coercion (1).

rw-sub-lvalueRaku++ passesRakudo passes2026-09-08 · d2eec312 · #69
  1. 1

    A call to an is rw sub is assignable, and the assignment writes the container the sub returned.

    f($v) = 7 writes through; Crane.in(%h, 'a') = 'Sea' fills %h

scalar-alias-keeps-typeRaku++ passesRakudo passes2026-10-28 · 5f87f445 · #184
  1. 1

    An alias of a typed $ variable (:=, an is rw parameter, for $a, given $a) refuses what the variable's type refuses, naming the variable, and its .VAR.of is the variable's type.

    my Int $a = 1; my $b := $a; $b = 'x' dies naming $a

scalar-itemizes-nativeRaku++ passesRakudo passes2026-10-08 · 5db9e33a
  1. 1

    A $ container itemizes the Array, Hash or List it holds, so for $a runs once and .raku shows the $.

    my $a = [1, 2]; for $a { … } runs once; $a.raku is $[1, 2]

scalar-param-itemizesRaku++ passesRakudo passes2026-08-20 · fa5c2fba
  1. 2

    A for loop variable -> $x receives itemized elements, and the bare topic over an Array is itemized too, while a List's elements arrive bare.

    for ((1,2),(3,4)) { $_ } keeps $_ unitemized

More from this test: Signatures & dispatch (2).

scalars-nil-junction-complex-dateRaku++ passesRakudo passes2026-07-27 · ebbe10f3
  1. 1

    Nil[…] and Nil{…} are Nil at any depth, and a slice of Nil gives one Nil per index.

    (Nil)[0,1] is two Nils

More from this test: Concurrency (1), Dates & times (1), Numerics (3), Classes, roles & the MOP (1), Operators (1), Everything else (1), Stringification (1), Syntax & parsing (1), Types & coercion (1).

seq-lol-and-callable-namedRaku++ passesRakudo passes2026-08-05 · 21d5791b
  1. 6

    for %h.values.grep(…) aliases the hash slots, so assigning to the loop topic changes the hash.

  2. 7

    for $scalar aliases the variable as the topic, and a write made inside the loop through the variable's own name is kept.

More from this test: Lists & laziness (1), Operators (3), Signatures & dispatch (1).

short-circuit-assign-into-containerRaku++ passesRakudo passes2026-10-02 · 925260b1
  1. 1

    @a ||= …, @a &&= … and %h ||= … assign the right-hand side's elements into the Array or Hash rather than storing the List or Range itself.

    shift state @colors ||= <green yellow> works, and %h ||= (a => 1) keeps its pair

sigilless-binds-the-containerRaku++ passesRakudo passes2026-10-07 · c0496b90
  1. 1

    For a sigilless \ declarator = means :=: a container on the right side becomes the name's own container, so the name can be assigned to and x.VAR is that Scalar.

    my \x = $ = 5; x = 6 assigns 6

  2. 2

    A sigilless name bound to an Array takes a list assignment whole.

    my \a = [1,2,3]; a = 4, 5, 6 stores all three values

  3. 3

    my \x = $y, my \x := $y and my \v := %h<a> alias the variable or element, so a write through the sigilless name reaches it.

  4. 7

    my \x = $!a and my $x := $!a alias the attribute instead of copying it.

More from this test: Classes, roles & the MOP (1), Signatures & dispatch (3).

sigilless-names-token-and-destructureRaku++ passesRakudo passes2026-11-13 · d77e1185 · rakudo#5027
  1. 2

    A sigilless name in a list assignment holds a list as it is, without itemizing it.

    my (\a, \b) = (1, 2), 3 makes a the List, not $(1, 2)

More from this test: Syntax & parsing (1).

sigilless-object-storeRaku++ passesRakudo passes2026-11-13 · b66ccda3 · rakudo#3292
  1. 1

    Assigning to a sigilless name bound to an object that has a STORE method calls that STORE.

    my \foo = HistoryVar.new; foo = 1 calls HistoryVar's STORE

  2. 2

    Assigning to a sigilless name bound to an object without STORE, to a value or to a type object is refused, after the right-hand side has been evaluated.

sink-does-not-descend-a-containerRaku++ passesRakudo passes2026-09-11 · ac8c0889
  1. 1

    Sinking a statement's value does not reach through a Scalar container: a bare variable, an assignment or a subscript as a statement is quiet even when it holds a failed Proc.

    $p;, $q = failing-proc(); and @a[0]; are quiet where failing-proc(); and $p<>; throw

  2. 2

    A routine's implicit tail value is decontainerized and so sinks when the caller discards it, while an explicit return $p, an is raw routine's tail and a block's tail value stay contained and quiet.

smiley-element-type-checkedRaku++ passesRakudo passes2026-11-09 · 3341d028
  1. 1

    A type-check failure on an element of an array whose element type has a smiley names the whole type, smiley included, as the expected type.

    my Int:D @d = 1; @d[0] = "s" says "expected Int:D"

  2. 2

    .push, .append and .unshift of a type object into an array with a :D element type are refused.

    my Int:D @d = 1; @d.push(Int) is refused

  3. 3

    An element of an Array[Str:D] refuses a type object or Nil.

  4. 4

    An element of a :D-typed array declared is default accepts Nil.

    Also held by smiley-element-type-kept.

smiley-element-type-keptRaku++ passesRakudo passes2026-11-09 · a776b42a
  1. 2

    Assigning Nil to an element of a :D-typed array is refused with the hint "perhaps Nil was assigned to a :D which had no default?".

    my Int:D @d; @d[0] = Nil is refused

  2. 3

    The default of a missing element in a :D-typed array is the bare type object.

    my Int:D @d; @d[5] is (Int)

More from this test: Types & coercion (1).

smiley-refusal-wordingRaku++ passesRakudo passes2026-11-09 · 868dbe53
  1. 1

    A :D or :U type-check refusal shows the value it got as its type followed by its .raku in parentheses.

    my Int:D $x = 1; $x = Int says "… but got Int (Int)"

  2. 2

    Assigning Nil to a :D variable is reported as getting the type the Nil resets to, with the hint "(perhaps Nil was assigned to a :D which had no default?)".

    my Int:D $x = 1; $x = Nil says "… but got Int (Int) (perhaps Nil was assigned to a :D which had no default?)"

smiley-var-checkedRaku++ passesRakudo cannot run it2026-11-03 · 0d9ea1ca
  1. 2

    (state @a) = 1, 2 assigns every time it is evaluated, not once. inferred

More from this test: Scoping & phasers (1), Types & coercion (1).

subscript-key-recursive-rhsRaku++ passesRakudo passes2026-10-19 · 9550aecc
  1. 1

    In %h{EXPR} = RHS and @a[EXPR] = RHS, each call of a routine assigns to the key its own EXPR produced, even when RHS calls back into the same routine.

todo-small-divergencesRaku++ passesRakudo passes2026-10-10 · 79f0bc7c
  1. 2

    A hole of an is default(v) array reads as v through .kv, .pairs, .grep, for and |@a.

  2. 17

    for @$list.kv -> $i, $x is rw over a List is refused, since a List's values are not containers.

More from this test: Concurrency (1), Lists & laziness (3), Classes, roles & the MOP (2), Operators (1), Regexes & grammars (1), Scoping & phasers (2), Stringification (3), Types & coercion (3).

todo-small-divergences-2026-10-11Raku++ passesRakudo does not pass2026-10-11 · fc6abf32
  1. 7

    An OP= into an element of a typed container type-checks, and for a coercion type coerces, the result.

More from this test: Classes, roles & the MOP (2), Operators (2), Scoping & phasers (1), Signatures & dispatch (2), Strings & Unicode (1), Syntax & parsing (3), Types & coercion (4), divergences (1).

top100-refresh-2026-09-03Raku++ passesRakudo passes2026-09-03 · 3d4ec585
  1. 1

    Assigning Nil through an is rw accessor ($obj.attr = Nil) resets the attribute to its default without consulting its declared type or where clause.

    with has Port $.port is rw, .port = Nil leaves the attribute undefined

More from this test: Signatures & dispatch (1), Stringification (1), Syntax & parsing (1), Types & coercion (1).

top100-roots-2026-09-02Raku++ passesRakudo does not pass2026-09-02 · 7af75847
  1. 12

    Assigning a Blob held in a scalar to an ordinary array stores it as one element, while a native array takes the Blob's elements.

    my @one = $body has 1 element; my uint32 @native = "hi".encode has 2

More from this test: Exceptions & control flow (2), Lists & laziness (1), Modules (1), Native types & NativeCall (3), Numerics (1), Classes, roles & the MOP (4), Regexes & grammars (3), Scoping & phasers (1), Stringification (1), Strings & Unicode (2), Syntax & parsing (3), Types & coercion (6).

topic-alias-and-repl-methodsRaku++ passesRakudo passes2026-08-05 · 21d5791b
  1. 1

    $_ in given and in for over a scalar variable is an alias to that variable, so mutating $_ writes back to it.

    my $a = 'foo'; s/f/F/ given $a leaves $a as Foo

More from this test: Regexes & grammars (1).

topic-binding-keeps-containernessRaku++ passesRakudo passes2026-08-23 · 3cdd9a5c
  1. 1

    given and with bind $_ to their argument without a fresh container, so for $_ iterates an array topic element by element.

    given @data { for $_ -> @row { … } } runs once per row

typed-buf-elementsRaku++ passesRakudo passes2026-07-31 · eb526782
  1. 2

    .push, .unshift and .append on a typed buf add one element per value, and .pop/.shift remove one whole element.

    14 pushes onto a buf32 add 14 elements

  2. 3

    .write-uintN(pos, …) on a typed buf takes pos in elements and grows the buf to pos + N elements.

    buf32.new(1,2,3).write-uint64(3, v) leaves .elems == 11

More from this test: Types & coercion (1).

typed-element-alias-guardsRaku++ passesRakudo passes2026-11-09 · 4c47943e
  1. 1

    A typed Array's element written through the topic of .hyper.map or .hyper.grep, or through an is rw value parameter of for @a.kv, is type-checked against the element type.

    storing "x" into an element of my Int @a through for @a.kv -> $k, $v is rw is refused

  2. 2

    A typed Hash's value written through an is rw value parameter of for %h.kv is type-checked against the value type.

typed-param-var-is-valueRaku++ passesRakudo passes2026-11-08 · 019f922c
  1. 1

    A typed read-only $ parameter is bound to its value with no Scalar around it, so its .VAR is the value's type — a named, optional or defaulted one too, in a sub, a method and a pointy block.

    sub t(Channel $in) { $in.VAR.^name } says Channel

  2. 2

    An untyped or Any parameter, an is copy or an is rw one has its Scalar, and an Iterable bound to a typed $ parameter is still itemized.

undefined-array-head-lvalue-empty-matchRaku++ passesRakudo passes2026-08-20 · a9358900
  1. 2

    .head and .tail with no argument return the element's container, so they are assignable.

    @stack.tail = … replaces the last element

More from this test: Operators (1), Types & coercion (1).

vivified-scalar-is-itemizedRaku++ passesRakudo passes2026-10-07 · c0496b90
  1. 1

    What an undefined $ variable autovivifies lives in that Scalar itemized, as an assigned Array or Hash does.

    my $x; $x.push(1); $x.raku is $[1]; my $h; $h<k> = 1; $h.raku is ${:k(1)}

    Also held by immutable-step-and-vivify.

whatever-subscript-asks-the-containerRaku++ passesRakudo passes2026-09-15 · 43815963
  1. 1

    @a[*-1] on a user container class resolves the WhateverCode against the container's own .elems and passes AT-POS the resulting Int.

where-alias-checkedRaku++ passesRakudo passes2026-11-09 · 5932b773
  1. 1

    A variable's where clause is checked on an assignment made through any alias of the variable: a := binding, the $_ of with, or an is rw parameter.

    my $wh where Int = 1; my $w := $wh; $w = "q" is a type-check failure in assignment, "expected <anon>"

  2. 2

    A variable's where clause runs in the scope that declared the variable, wherever the assignment is made.

zef-install-clusterRaku++ passesRakudo passes2026-07-25 · da1b9b3d
  1. 2

    Assigning to an element reached through read-only accessors, $c.dist.metainfo<k> = v, mutates the hash the attribute holds; only assigning to the accessor itself ($c.ro = v) dies.

More from this test: Exceptions & control flow (3), Modules (1), Types & coercion (1).

zen-slice-decontainerizesRaku++ passesRakudo does not pass2026-09-01 · 658f45d1 · #55
  1. 1

    A zen slice on a Scalar ($x<>, $x[], $x{}, and the dotted .<>, .[], .{}) decontainerizes it, so iterating the result walks the elements it holds.

    for $aoa<> iterates the elements of the array in $aoa