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 probes- 1
An array slot nobody wrote (past a gap, after
:delete, in a fresh shaped array) is a hole: it does not exist,.Listshows it as Nil, and a read gives the element default (Any, the element type, or theis defaultvalue).@a[3] = 1on an empty array leaves three holes - 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 probes- 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 probes- 1
A
Nilstored into an array element is the container's default by every route:@a.push: Nil,push @a, Nil,@a.ASSIGN-POS(0, Nil)andArray.new(Nil)leave what@a[0] = Nilleaves. - 2
A
Nilargument tospliceis Any, not the element default, and a typed array refuses it. - 3
A
Nilin a List stays Nil, because a List is no container.
stored-undefined-elementsRaku++ matches Rakudo on all 27 probes- 1
An undefined value stored into an array element is a value that is there: after
my @a = $u,@a.push: $uor@a[0] = $uthe slot exists and reads as(Any); only a slot nobody wrote is a hole.
anton-batch-2026-09-12Raku++ passesRakudo passes- 1
An
is rwparameter passed on to another routine'sis rwparameter 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. inferredsub inner($y is rw) { return sub { $y = "inner-wrote" } }; sub outer($x is rw) { return inner($x) }; my $v = "initial"; outer($v)()leaves$vas"inner-wrote"
More from this test: Operators (1), Syntax & parsing (1).
array-coercion-decontRaku++ passesRakudo passesarray-elements-are-items-to-list-methodsRaku++ passesRakudo passes- 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 passes- 1
.first,.headand.tailof an Array hand back the elements' own containers, so binding, a sigilless name or afortopic over them writes the array.my \x = @a.first; x = 9writes@a, andfor @a.head(2) { $_ = 7 }changes the first two elements - 2
.first(:k)and the.first/.head/.tailof a List give values, not containers.
array-head-keeps-element-containersRaku++ passesRakudo passes- 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] = 42reads(42, 2)
More from this test: divergences (1).
array-is-list-containerRaku++ passesRakudo passes- 1
my @list is List = …declares a List, not an Array.
array-views-typedRaku++ passesRakudo passes- 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
@a.Listand 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 passes- 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.Listof it) lands in the array.with
$rsuch a list,$r[0] = 9,$r[1]++and$r[2] ~= 'x'change@a - 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 passes- 1
ASSIGN-POSandASSIGN-KEYstore 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 passes- 1
A value entering an attribute through the default constructor, an attribute default,
.cloneor 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 passes- 8
A typed
statevariable 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 passes- 1
.selfdecontainerizes 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 passes- 1
my %andmy &declare anonymous variables, and a block containing such a declaration runs without error.{ my % }runsAlso held by
bare-sigil-anon-in-block. - 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 passes- 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 := $wthe element still reads the container$vhad - 2
BIND-POSandBIND-KEYgiven a readonly parameter bind its value in a container of its own.
bind-to-hash-slotRaku++ passesRakudo passesbind-type-object-immutableRaku++ passesRakudo passes- 1
Binding a name to a type object binds the value with no container, so a later assignment dies.
my $x := Int; $x = 5dies - 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 passes- 1
Binding a scalar to an array element (
my $node := @a[$pos]) aliases the slot, so assigning through the scalar writes the array. - 2
my \p = @a[i]binds the sigilless name to the element, so assigning topwrites the element, while readingpas an rvalue gives the value.
More from this test: Classes, roles & the MOP (3), Operators (2).
blob-element-op-assign-refusedRaku++ passesRakudo passes- 1
A compound assignment to a Blob's element,
$blob[0] += 1, is refused with X::Assignment::RO, as$blob[0] = 2is.my $b = Blob.new(1,2); $b[0] += 1dies with X::Assignment::RO
More from this test: divergences (1).
blob-iteration-and-mutate-lvalueRaku++ passesRakudo passes- 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 passes- 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 passes- 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 := $recursewith$recurseundefined,$!recurse || …evaluates the right side
More from this test: Lists & laziness (1), Syntax & parsing (1).
bound-element-compound-assignRaku++ passesRakudo passes- 1
+=,~=and++on a scalar bound to an array element read and write that element.after
my $c := @arr[0],$c += 1adds 1 to the element
bound-element-reads-through-proxyRaku++ passesRakudo passes- 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.valuecounts the bound array's elements andfor $spec.value<> { … }walks them - 2
A user's
Proxyis read through its FETCH by prefix+and-, the zen slices and@(…).
bound-element-storeRaku++ passesRakudo passes- 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] = 9sets$c, and so do@b[0, 1] = …and(@b[0], @b[1]) = … - 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 passes- 1
A scalar bound to an array is that array, and
=:=says so.my $h := @a; $h =:= @ais True
bound-slice-is-a-listRaku++ passesRakudo passes- 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), andmy \x = %h<a b>makes no "a b" entry
More from this test: divergences (1).
bson-simple-and-hash-agnosticRaku++ passesRakudo passes- 10
Assigning to a
$scalar that holds an object with aSTOREmethod replaces what the scalar holds; only a%or@variable declaredis Typeroutes assignment to that type'sSTORE. - 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> = 666fails - 12
An alias bound to an array element survives a
pushon the array, and after aspliceremoves the element the alias keeps the value it named.my @b = 1, 2, 3; my $x := @b[1]; @b.push(9); $x = 5leaves@bas[1, 5, 3, 9] - 14
An anonymous
my % is Type = …applies its container trait, so the type'sSTOREruns.
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 passesbuf-write-in-placeRaku++ passesRakudo passes- 1
A Buf's
write-*methods write the storage every holder of the Buf shares, as$b[i] = vdoes.after
my $c = $b; $c.write-uint16(…),$bshows the write
cell-rebind-and-alias-identityRaku++ passesRakudo passes- 1
A name bound to a value with
:=cannot be assigned to but can always be rebound with:=.my $r := 42; $r = 1dies, whilemy $r := $v +& $m; $r := $r - $m - 1is legal - 2
=:=between two array elements compares their containers, so two elements holding equal values are not=:=. - 3
An element handed out by
take-rwis=:=to the slot it came from.
channel-pipe-clone-issues-144-148Raku++ passesRakudo passes- 1
.cloneof an Array held in a scalar is not itemized when assigned to an array.my @b = $a.clonehas the Array's elements, not one element
More from this test: Concurrency (1), I/O & processes (1).
class-range-spaces-set-identity-aliasRaku++ passesRakudo passes- 4
foraliases the elements of an array named in its list, whether written@aor 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 passes- 1
Cloning a Pair gives an independent Pair: assigning to the clone's
.valuedoes not change the original.$p.clone.value = 7leaves$punchanged
More from this test: Classes, roles & the MOP (4), Operators (1), Scoping & phasers (1).
codegen-captured-container-and-autovivRaku++ passesRakudo passes- 2
.push,.append,.unshiftor.prependon a not-yet-existing array element autovivifies that element.@ready[2].push(10)leaves@ready[2]holding 10
compound-assign-typecheckRaku++ passesRakudo passes- 1
A compound assignment to a type-constrained
$variable is checked as=is: a result of the wrong type dies withX::TypeCheck::Assignmentand the variable keeps its value.my Int $e = 5; $e /= 1dies with X::TypeCheck::Assignment and$eis still 5 - 3
A compound assignment to a variable with a
whereconstraint runs the constraint on the result.
More from this test: Types & coercion (1).
conformance-phase2-introspectionRaku++ passesRakudo passes- 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 passes- 1
my %h is MyHash = …declares the variable to be aMyHash; the initializer replaces its contents, not the container.after
my %h is MyHash = …,%h ~~ MyHashisTrue
container-lists-and-pair-cellsRaku++ passesRakudo passes- 1
A Capture literal's
$xpart is$x's container, so a write through the Capture's element changes the variable.\($a)[0]++steps$a - 3
$y := :$ybinds$yto a Pair holding$y's former value, not to a Pair that contains itself. - 4
$k => $vholds$v's container as the Pair's value. - 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 passes- 1
my %h is MyContainer = @pairspasses:INITIALIZEto the container'sSTOREon the declaration's own assignment and on no later assignment.
corpus-batch-1Raku++ passesRakudo passes- 2
Assigning an undefined value of a non-matching type to a typed scalar dies with
X::TypeCheck::Assignment, while the matching type object,Niland aFailureare accepted.my Int $i = $uwith$uholdingAnydies
More from this test: Numerics (1).
cro-core-clusterRaku++ passesRakudo passes- 2
A sigilless name bound to an array is the array itself, not an itemized scalar, so
flatflattens it.with
my \d = @xholding 1 and 2,flat(d, 3, d).join(',')is1,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 passes- 7
my (:@a, :@b) := %hdestructures 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 passes- 3
my @a := SubclassOfArray.newbinds 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 passes- 7
An itemized array can be bound to an
@variable or parameter. inferred - 12
Assigning to a variable whose container class defines
STOREcalls thatSTORE. 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 passes- 2
An uninitialized
my Int $xholds the type object(Int), not(Any).
deref-subscript-lvalueRaku++ passesRakudo passesdigest-bigint-and-native-clusterRaku++ passesRakudo passes- 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] +^= 0x06leaves$state[3]at 6
More from this test: Operators (1), Signatures & dispatch (3).
digest-native-widths-clusterRaku++ passesRakudo passes- 3
A type written before a parenthesised declaration list applies to every variable in the list.
my uint32 ($a, $b) = 0xFFFFFFFF + 5, 7gives(4, 7) - 4
$buf[i] = vwrites 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] = 300leaves(1, 44, 3)
More from this test: Lists & laziness (2), Numerics (4), Operators (2), Scoping & phasers (1).
dot-assign-itemizes-into-scalarRaku++ passesRakudo passes- 1
.=into a$variable itemizes what it stores, as=does.after
$x .= split(','),$x.rakushows$(…)andfor $xsees one item
duration-slip-fail-destructureRaku++ passesRakudo cannot run it- 5
A destructuring
my ($a, $b) = ITEMwith a single right-hand item iterates it, itemized or not, and a Hash gives its pairs.my ($k, $v) = %hputs pairs of%hin$kand$vAlso 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 passes- 1
A dynamic method call
$obj."$name"() = $valueis 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 passes- 7
$!attr := $rw-parambinds 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 passes- 1
Assigning
Nilthrough a:=alias of an untyped Array element or Hash value resets that element toAny.after
my @p = 1, 2; my $e := @p[0]; $e = Nil,@p[0]isAny, notNil
element-binds-the-containerRaku++ passesRakudo passes- 1
%h<k> := $abinds the element to$a's container, so a later write to$ais seen through the hash.
empty-block-is-nilRaku++ passesRakudo passes- 2
The declaration
my $x;evaluates to an undefinedAny, notNil.
More from this test: Exceptions & control flow (1).
exception-messages-and-mop-mutatorsRaku++ passesRakudo passes- 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 asmy Int $x := 'foo'does
More from this test: Exceptions & control flow (4), Classes, roles & the MOP (2).
exe-accessor-assignRaku++ passesRakudo passes- 3
An Array's
.tailand.headand anis rwmethod are assignable. inferred@s.tail = …and@a.head = …assign
More from this test: Classes, roles & the MOP (1).
exe-buf-whatever-index-nativeRaku++ passesRakudo passes- 2
$b[*-1]on a Buf or Blob reads the last element, and a store orop=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 passes- 8
my $x := 1, 2binds 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 passes- 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] = 9does not make$ban ArrayAlso held by
issue-161-exe-buf-element-store-in-routine. - 3
my @a := f()[0]binds@ato the element itself, not to a one-element list wrapping it.with
aoa()returning an array of arrays,my @a := aoa()[0]gives@athe inner array's elements
exe-pair-containers-through-a-moduleRaku++ passesRakudo passes- 2
A hash element bound to a variable with
%h{$k} := $varis written through to that variable by a later%h{$k} = $v.
exe-pair-key-and-adverbsRaku++ passesRakudo passes- 3
.dynamicasks the variable, not its value.my @c is dynamic; @c.dynamicis True
More from this test: Hashes & sets (1), Types & coercion (1).
exe-required-and-attributive-paramsRaku++ passesRakudo passes- 3
$!t = Nilresets 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 it- 1
Assigning
Nilto a$container resets it to its default, andmy @a = Nilholds one default element.my $r = try die "x"holdsAny, andmy @a = Nilis[Any] - 2
A typed
$container type-checks every assignment, andNilassigned to it restores the type's default rather than staying Nil.my Int $x; $x = "a"dies
exe-value-semanticsRaku++ passesRakudo passes- 6
A hash element is a Scalar container, so
%h<k> = @xstores 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 passes- 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 - 5
Nilstored 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 passes- 1
The
$_of a.firstblock on an Array is the element itself, so an assignment to it writes the element and the element is what.firstreturns.@a.first({ $_ = 9; True })writes 9 into the element and answers 9 - 2
A typed Array's element written through the
$_of a.firstblock is type-checked against the element type.
float-exe-reportRaku++ passesRakudo passes- 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 / $zerodies rather than becoming 2
for-immutable-topicRaku++ passesRakudo passes- 1
Assigning to a topic bound raw to a value with no container, such as the
$_offor 1..3or anis rawparameter, dies with "Cannot assign to an immutable value".for 1..3 { $_ = 9 }dies withCannot assign to an immutable value - 2
Assigning to a readonly container such as a plain
-> $iloop 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 passes- 2
A
forover an itemized Array, List or[]in a scalar hands the loop the container itself, whose.rakukeeps the$.
for-over-pod-variableRaku++ passesRakudo passes- 1
for $=poditerates the pod blocks one at a time, because$=podis bound without a Scalar container. - 2
A
$variable holding an Array is one item to aforloop.my $a = Array.new; for $a -> $i { ... }runs onceAlso held by
for-over-itemized-empty-array.
for-over-slice-aliasesRaku++ passesRakudo passes- 1
forover an array or hash slice hands out the element containers, so a write through the topic or anis rwparameter 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 passes- 1
@a.valuesand@a.listare views of the array, so aforover 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@ato 9 - 2
A
forloop's plain pointy-block variable-> $iis a readonly parameter, so assigning to it dies;$_and<->are the aliasing forms.for %h.values -> $v { $v = 9 }is refusedAlso held by
for-loop-var-is-readonly.
getopt-long-parameter-traitsRaku++ passesRakudo passes- 6
A Pair written
KEY => my $xcarries the variable's container, so assigning through the Pair's.valuechanges$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 passes- 13
An unassigned element of an array declared
is default(V)reads asV.
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 passes- 3
my %h is default(1) = …keeps its element default after the assignment:.defaultreports it and a missing key gives it.
More from this test: Hashes & sets (2).
hash-map-pair-semantics-sheetRaku++ passesRakudo passes- 9
Assigning
Nilto an element of a typed hash stores the element type object. inferredmy Int %h = a => 1; %h<a> = Nil; %h.rakuis(my Int % = :a(Int)) - 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. inferredmy %h := Map.new((a => 1)); %h = (b => 1)throws X::Assignment::RO - 22
A Pair binds its value: a literal or computed value is read-only (assigning to
.valuethrows X::Assignment::RO), a variable's container stays writable through.value, and the key is never writable. inferredmy $p = (a => 1); $p.value = 5throws X::Assignment::RO;my $p = (a => $x); $p.value = 5works
More from this test: Hashes & sets (13), Operators (4), Stringification (5), Types & coercion (1).
hash-values-map-rw-paramRaku++ passesRakudo passes- 1
%h.values.mapand.grepbind anis rw, raw or\xparameter 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 passes- 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 passes- 1
++or--on an element of a Pair, a List or a Range throws X::Multi::NoMatch, because the operator binds its argumentis rw, while=on such an element throws X::Assignment::RO.(a => 1)<a>++and(1, 2)[0]++throw X::Multi::NoMatch;(a => 1)<a> = 9throws X::Assignment::RO
issue-174-native-buffer-through-flatteningRaku++ passesRakudo passes- 2
A Buf is a reference type: every copy of the value shares one buffer, and
.clonemakes a second buffer.
More from this test: Native types & NativeCall (1).
issue-183-native-array-element-type-checkRaku++ passesRakudo passes- 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 passes- 1
Every alias of a typed array's element (
:=, a sigilless name, anis rwor sigilless parameter, aforloop'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 onNil.my Int @a = 1, 2, 3; my $e := @a[1]; $e = 'foo'dies, and$e.VAR.ofis(Int)
More from this test: divergences (1).
issue-185-andthen-topic-containerRaku++ passesRakudo passes- 1
The
$_on the right side ofandthen,orelseandnotandthenis 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 $_ = 2assigns@a[0] - 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, 4assigns the whole(2, 3, 4);$y and @b = 1, 2assigns only the 1 - 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
with @a[EXPR] { … }evaluates the subscript once and binds$_to that element's container.with @a[$i++] { $_ = 5 }steps$ionce and writes the element it tested - 5
Assigning to
$_insidewith $p { … }dies when$pis a readonly parameter.with $p { $_ = 5 }on a readonly parameter dies
issue-68-multidim-endless-rangeRaku++ passesRakudo times out- 3
Assignment to a multidimensional slice is a list assignment that distributes the values over the selected elements.
@a[0..*; 1] = 7, 8, 9, 10stores one value per row
More from this test: Lists & laziness (2), divergences (2).
issue35-zef-after-installRaku++ passesRakudo cannot run it- 6
A
$name bound with:=to a list has no item container, sofor $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 it- 5
Assigning
Nilto a typed array gives one element holding the default.my Bool @results = Nilhas one element, so?@resultsis True
More from this test: Modules (3), Regexes & grammars (1), Syntax & parsing (2), Types & coercion (1).
issue63-typed-container-elementsRaku++ passesRakudo passes- 1
A typed array, whether an attribute like
has Str @.dataor a lexical, type-checks every element that enters it and dies on a mismatch.storing an Int in
has Str @.datadies withType check failed for an element of @!data - 2
.ofon a typed array attribute answers the declared element type.
More from this test: Classes, roles & the MOP (1).
itemization-and-list-foldsRaku++ passesRakudo passes- 1
A
$variable itemizes the list it stores, so it does not flatten into a later list.after
my $t = (1,2),my @b = $thas one element
More from this test: Lists & laziness (3), Numerics (1), Operators (2), Regexes & grammars (1), Stringification (1).
itemized-argument-is-one-itemRaku++ passesRakudo passes- 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.shiftor:deletethe List still holds the container it had.Also held by
list-holds-variable-containers. - 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 passes- 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), 3gives$a1..2
More from this test: Lists & laziness (1).
itemized-storesRaku++ passesRakudo passes- 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//=,||=,.pushof a Hash onto a new key and aHash()append merge.after
%h<a> //= …with a list,my @a = %h<a>has one element
iterable-object-and-named-subsigRaku++ passesRakudo passes- 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 passes- 3
A list assignment to a parenthesized declaration iterates a single item on its right side:
my ($p, $q, $r) = @bands[1]andmy ($s, $t) = $itemunpack the element. inferredmy $item = (5, 6); my ($s, $t) = $itemgives 5 and 6 - 4
Assigning to an open-ended slice
@a[1..*]writes only the existing elements and drops values that do not fit. inferredmy @w = 1, 20, 30, 40; @w[2..*] = 7, 8, 9, 10leaves[1, 20, 7, 8]
More from this test: Lists & laziness (2), Operators (1).
json-fast-clusterRaku++ passesRakudo does not pass- 10
A ternary is an lvalue over the branch it picks.
(True ?? $x !! $y) = 9sets$xto 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 it- 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 aNilresets 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 passes- 6
A hole in an
is defaultarray reads as the default in a subscript, in.raku, injoinand inshift, and trailing deletes still shrink the array. inferredmy @a is default(7); @a[2] = 1; @a.rakuis[7, 7, 1] - 7
.nameon an array variable answers the variable's name. inferred(my @named).nameis@named - 8
A shaped array's
.rakunames its shape, an index outside the shape throws, and a Range is not a valid:shape. inferredmy @a[2]; @a[0] = 1; @a.rakuisArray.new(:shape(2,), [1, Any]) - 15
Assigning a Set or a Hash to an array stores its pairs, and
appendspreads a Hash into its pairs. inferred(my @s = set(1)).rakuis[1 => Bool::True] - 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. inferredmy @a = 1, 2, 3; @a[*] = 0leaves[0, Any, Any];@a[] = 5, 6leaves[5, 6] - 18
@a.map(* *= 2)writes through to the array's elements, and.firston an array answers an assignable element. inferredmy @a = 1, 2, 3; @a.first = 9leaves[9, 2, 3] - 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. inferredmy ($a, $b, $c) = (1, 2), 3gives($(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 passes- 1
A list assignment into previously declared variables checks each target as a plain
$x = vdoes: its nominal type, its:Dsmiley, itswhereclause and its coercion type.my Int $a = 1; ($a, $z) = "la", 2is refused;my Int() $cassigned "5" in a list assignment holds the coerced value
list-assign-keeps-inner-list-wholeRaku++ passesRakudo passes- 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$athe whole List
list-constant-nativeRaku++ passesRakudo passes- 1
A
constant @Lkeeps 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 passeslist-literal-item-typed-assignRaku++ passesRakudo passes- 1
An assignment through a subscript of a list literal that holds a variable is checked against that variable's type,
:Dsmiley and coercion type, as$a = vis.my Int $a; ($a, 2)[0] = "l"dies "Type check failed in assignment to $a" - 2
Assigning
Nilthrough a subscript of a list literal that holds a variable resets the variable to its default: its type object or itsis defaultvalue.my Int $a; ($a, 2)[0] = Nilleaves$aas(Int)
map-rw-param-binds-elementRaku++ passesRakudo passes- 1
An
is rw, raw or\xparameter of the block or routine.mapcalls is bound to the Array's element, each parameter of a chunk to its own, while a plain oris copyone 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 passes- 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 passes- 3
.itemand theitem(…)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 passesnative-array-elementsRaku++ passesRakudo passes- 2
A native array's element is boxed when copied into a container (an Array, a scalar, a hash, a
push, the[…]composer), by.popand.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 passes- 2
Assigning past the end of a native
intornumarray fills the gap with 0 (0e0).
native-param-refuses-kindRaku++ passesRakudo passes- 4
my int $x = 1.5e0is refused with the same unbox error and wording as a Num or Rat bound to anintparameter.
More from this test: Signatures & dispatch (3).
native-return-value-is-not-a-containerRaku++ passesRakudo passes- 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()withfreturning a native int,$v := [7, 8]binds the Array, not 2
native-typed-sub-lean-and-loop-kernelRaku++ passesRakudo cannot run it- 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$ainstead of dying "Cannot modify an immutable List"Also held by
exe-kept-list-writes.
nested-list-assign-flattensRaku++ passesRakudo passes- 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 passes- 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$xAlso held by
list-holds-variable-containers.
More from this test: Stringification (1).
nil-binds-and-resetsRaku++ passesRakudo passes- 1
my \x = Nilandconstant c = Nilbind, so the name isNilitself, notAny. - 2
In a list assignment a
Nilon the right resets the target container to its default instead of being stored or type-checked.my ($a, $b) = Nil, 5does not leaveNilin$a;my Int ($a) = Nildoes not die - 3
In a list assignment each element of an
@target is a container thatNilresets, and a%target is stored into asmy %h = …is, an odd number of items being an error.
nqp-iterator-buffer-and-bindattrRaku++ passesRakudo passes- 2
An attribute bound with
nqp::bindattrfrom 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 passes- 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
A type-check failure from
//=,||=or&&=on a typed element names the element with its subscript.
open-modes-bind-end-shiftRaku++ passesRakudo cannot run it- 2
A positional list declaration can be bound with
:=, as inmy ($a, $b) := ....my (&tempfile, &tempdir) := '...'.EVALbinds both
More from this test: I/O & processes (1), Scoping & phasers (1), Syntax & parsing (1).
packed-array-copyRaku++ passesRakudo passes- 2
my num @c = @bmakes an independent copy: a store into either array leaves the other alone.
packed-computed-keyRaku++ passesRakudo passes- 2
A subscript's key is evaluated once.
a key with an effect,
$k++ + 1, steps$konceAlso held by
carray-index-once,subscript-key-evaluated-once.
pair-and-list-are-immutableRaku++ passesRakudo passes- 1
Assigning to a Pair through a subscript throws
X::Assignment::RO, whether the Pair holds a literal or a container.(a => 1)<a> = 9throwsX::Assignment::RO - 2
:deleteon a Pair or on a List throwsX::AdHoc.(a => 1)<a>:deletethrows - 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 passes- 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 passes- 1
.VAR.nameon 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 @xanswers "@x" for@p.VAR.name
parameterized-decl-bind-posRaku++ passesRakudo passes- 2
BIND-POSstores 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 passes- 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 passes- 29
An assignment to a Proxy is worth what
FETCHanswers afterwards, not whatSTOREreturned. - 33
Assigning
Nilto a subset-typed attribute resets it to its default rather than failing the type check. - 40
my $v := $p.valuebinds the Pair's value container, also when the Pair comes through adoblock. - 42
$obj<k> = von a user Associative is worth what the container holds after the store, not the right-hand side. - 43
$obj<k>++on a user Associative goes throughASSIGN-KEY. - 44
Subscripting a Proxy handed back by an
is rwmethod reaches the value the Proxy holds. - 48
An overriding
is rwAT-POS/AT-KEYthat callscallsameyields a container that can be assigned to. - 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 passes- 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 passes- 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, wheremethod m() is rwreturns a Proxy, runs FETCH onceAlso held by
proxy-fetch.
rakudo-t-language-gaps-1Raku++ passesRakudo passes- 8
.=through an element handed out bytake-rwstores 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 passes- 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 passes- 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 passes- 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$sis not a number
More from this test: Regexes & grammars (2).
return-rw-local-not-danglingRaku++ passesRakudo passes- 1
return-rwof 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 $roothands back a writable element
roast-last-filesRaku++ passesRakudo passes- 5
A sigilless invocant (
\SELF:) is the caller's container, so anis rawAT-POSthat returnsSELF.substr-rw(…)can be assigned through. inferred - 10
my @s := @a[1, 2](or:= %h<b c>) binds the elements' containers, so assigning through@swrites the array or hash, one value per container. inferredwith
my @arr = <a b c d>; my @sl := @arr[1, 2],@sl = <A B C D>leaves@arr.joinasaABd
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 passes- 8
An
@-sigiled name binds only a Positional:my @a := 1and binding a Failure throwX::TypeCheck::Binding. inferredmy @r := 1is X::TypeCheck::Binding
More from this test: Classes, roles & the MOP (3), Signatures & dispatch (7), divergences (1).
roast-sweep-runtimeRaku++ passesRakudo cannot run it- 7
pushautovivifies an undefined$variable into an Array. inferred - 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 passes- 1
When an
is rwparameter is passed on to another routine'sis rwparameter, the intermediate routine sees the inner routine's writes, so its own later modification builds on them.with
c2incrementing its rw parameter,sub c1($ip is rw) { c2($ip); $ip++ }increments the caller's variable twice
rw-kv-loop-over-derefRaku++ passesRakudo passes- 1
for @$h.kv -> $i, $x is rw(and%$h.kv) writes through to the container$hholds.
rw-kv-loop-over-scalarRaku++ passesRakudo passes- 1
for $h.kv -> $k, $v is rwover a scalar holding an Array or Hash writes through to it.
rw-returns-and-container-traitsRaku++ passesRakudo passes- 1
my %h is MyHash(ormy @a is MyArray) makes the variable an instance of the named container class.my %top is MyH; %top.^nameisMyH - 2
The result of a routine declared
is rworis raw, or returned withreturn-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 passes- 1
A call to an
is rwsub is assignable, and the assignment writes the container the sub returned.f($v) = 7writes through;Crane.in(%h, 'a') = 'Sea'fills%h
scalar-alias-keeps-typeRaku++ passesRakudo passes- 1
An alias of a typed
$variable (:=, anis rwparameter,for $a,given $a) refuses what the variable's type refuses, naming the variable, and its.VAR.ofis the variable's type.my Int $a = 1; my $b := $a; $b = 'x'dies naming$a
scalar-itemizes-nativeRaku++ passesRakudo passes- 1
A
$container itemizes the Array, Hash or List it holds, sofor $aruns once and.rakushows the$.my $a = [1, 2]; for $a { … }runs once;$a.rakuis$[1, 2]
scalar-param-itemizesRaku++ passesRakudo passes- 2
A
forloop variable-> $xreceives 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 passes- 1
Nil[…]andNil{…}areNilat any depth, and a slice ofNilgives oneNilper 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 passes- 6
for %h.values.grep(…)aliases the hash slots, so assigning to the loop topic changes the hash. - 7
for $scalaraliases 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 passes- 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 passes- 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 andx.VARis that Scalar.my \x = $ = 5; x = 6assigns 6 - 2
A sigilless name bound to an Array takes a list assignment whole.
my \a = [1,2,3]; a = 4, 5, 6stores all three values - 3
my \x = $y,my \x := $yandmy \v := %h<a>alias the variable or element, so a write through the sigilless name reaches it. - 7
my \x = $!aandmy $x := $!aalias the attribute instead of copying it.
More from this test: Classes, roles & the MOP (1), Signatures & dispatch (3).
sigilless-names-token-and-destructureRaku++ passesRakudo passes- 2
A sigilless name in a list assignment holds a list as it is, without itemizing it.
my (\a, \b) = (1, 2), 3makesathe List, not$(1, 2)
More from this test: Syntax & parsing (1).
sigilless-object-storeRaku++ passesRakudo passes- 1
Assigning to a sigilless name bound to an object that has a
STOREmethod calls thatSTORE.my \foo = HistoryVar.new; foo = 1calls HistoryVar's STORE - 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 passes- 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 wherefailing-proc();and$p<>;throw - 2
A routine's implicit tail value is decontainerized and so sinks when the caller discards it, while an explicit
return $p, anis rawroutine's tail and a block's tail value stay contained and quiet.
smiley-element-type-checkedRaku++ passesRakudo passes- 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
.push,.appendand.unshiftof a type object into an array with a:Delement type are refused.my Int:D @d = 1; @d.push(Int)is refused - 3
An element of an
Array[Str:D]refuses a type object orNil. - 4
An element of a
:D-typed array declaredis defaultacceptsNil.Also held by
smiley-element-type-kept.
smiley-element-type-keptRaku++ passesRakudo passes- 2
Assigning
Nilto 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] = Nilis refused - 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 passes- 1
A
:Dor:Utype-check refusal shows the value it got as its type followed by its.rakuin parentheses.my Int:D $x = 1; $x = Intsays "… but got Int (Int)" - 2
Assigning
Nilto a:Dvariable is reported as getting the type theNilresets to, with the hint "(perhaps Nil was assigned to a :D which had no default?)".my Int:D $x = 1; $x = Nilsays "… but got Int (Int) (perhaps Nil was assigned to a :D which had no default?)"
smiley-var-checkedRaku++ passesRakudo cannot run it- 2
(state @a) = 1, 2assigns every time it is evaluated, not once. inferred
More from this test: Scoping & phasers (1), Types & coercion (1).
subscript-key-recursive-rhsRaku++ passesRakudo passes- 1
In
%h{EXPR} = RHSand@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 passes- 2
A hole of an
is default(v)array reads as v through.kv,.pairs,.grep,forand|@a. - 17
for @$list.kv -> $i, $x is rwover 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 pass- 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 passes- 1
Assigning
Nilthrough anis rwaccessor ($obj.attr = Nil) resets the attribute to its default without consulting its declared type orwhereclause.with
has Port $.port is rw,.port = Nilleaves 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 pass- 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 = $bodyhas 1 element;my uint32 @native = "hi".encodehas 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 passes- 1
$_ingivenand inforover a scalar variable is an alias to that variable, so mutating$_writes back to it.my $a = 'foo'; s/f/F/ given $aleaves$aasFoo
More from this test: Regexes & grammars (1).
topic-binding-keeps-containernessRaku++ passesRakudo passes- 1
givenandwithbind$_to their argument without a fresh container, sofor $_iterates an array topic element by element.given @data { for $_ -> @row { … } }runs once per row
typed-buf-elementsRaku++ passesRakudo passes- 2
.push,.unshiftand.appendon a typed buf add one element per value, and.pop/.shiftremove one whole element.14 pushes onto a
buf32add 14 elements - 3
.write-uintN(pos, …)on a typed buf takesposin elements and grows the buf topos + Nelements.buf32.new(1,2,3).write-uint64(3, v)leaves.elems == 11
More from this test: Types & coercion (1).
typed-element-alias-guardsRaku++ passesRakudo passes- 1
A typed Array's element written through the topic of
.hyper.mapor.hyper.grep, or through anis rwvalue parameter offor @a.kv, is type-checked against the element type.storing "x" into an element of
my Int @athroughfor @a.kv -> $k, $v is rwis refused - 2
A typed Hash's value written through an
is rwvalue parameter offor %h.kvis type-checked against the value type.
typed-param-var-is-valueRaku++ passesRakudo passes- 1
A typed read-only
$parameter is bound to its value with no Scalar around it, so its.VARis 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
An untyped or
Anyparameter, anis copyor anis rwone has its Scalar, and an Iterable bound to a typed$parameter is still itemized.
undefined-array-head-lvalue-empty-matchRaku++ passesRakudo passes- 2
.headand.tailwith 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 passes- 1
What an undefined
$variable autovivifies lives in that Scalar itemized, as an assigned Array or Hash does.my $x; $x.push(1); $x.rakuis$[1];my $h; $h<k> = 1; $h.rakuis${:k(1)}Also held by
immutable-step-and-vivify.
whatever-subscript-asks-the-containerRaku++ passesRakudo passes- 1
@a[*-1]on a user container class resolves the WhateverCode against the container's own.elemsand passesAT-POSthe resulting Int.
where-alias-checkedRaku++ passesRakudo passes- 1
A variable's
whereclause is checked on an assignment made through any alias of the variable: a:=binding, the$_ofwith, or anis rwparameter.my $wh where Int = 1; my $w := $wh; $w = "q"is a type-check failure in assignment, "expected <anon>" - 2
A variable's
whereclause runs in the scope that declared the variable, wherever the assignment is made.
zef-install-clusterRaku++ passesRakudo passes- 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 pass- 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