Exceptions & control flow
Failures, try and CATCH, control exceptions, return, next, last.
135 rules from 87 tests. 71 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.
readonly-errorsRaku++ matches Rakudo on 36 of 44 probes- 1
Every operator that assigns (
=,+=,++…), applied to a value that is not a container, throws the immutability exception of the right type, such asX::Assignment::RO. inferred
start-returnRaku++ matches Rakudo on 43 of 75 probes- 2
A control exception with no routine or loop to catch it is an error, in every kind of block that can hold one. inferred
6e-gatingRaku++ passesRakudo cannot run it- 25
From 6.e
next(value)andlast(value)supply a value to the loop's result; before 6.e such a call is a compile-time error and nothing runs.under 6.e
(1,2,3).map({ $_ == 2 ?? next(42) !! $_ }).Listis(1 42 3)and withlast(99)it is(1 99); under 6.d "Calling next(Int) will never work"
More from this test: Dates & times (2), Hashes & sets (3), I/O & processes (2), Lists & laziness (8), Numerics (1), Classes, roles & the MOP (2), Operators (1), Everything else (2), Regexes & grammars (2), Scoping & phasers (2), Signatures & dispatch (1), Strings & Unicode (6), divergences (1).
audited-language-gaps-1Raku++ passesRakudo passes- 11
The type object of a user Exception subclass cannot
.throw.
More from this test: Concurrency (1), Containers & assignment (1), Hashes & sets (1), Lists & laziness (2), Operators (1), Regexes & grammars (2), Signatures & dispatch (3), Syntax & parsing (2).
backtrace-caughtRaku++ passesRakudo passesbacktrace-newRaku++ passesRakudo cannot run itbacktrace-uncaughtRaku++ passesRakudo times out- 1
An uncaught exception prints its message on the first line, followed by backtrace frames of the form
in <kind> <name> at FILE line N.
backtrace-warn-fail-awaitRaku++ passesRakudo cannot run itbase64-sextetRaku++ passesRakudo passes- 1
In the statement form
do with (EXPR) { $^a }, the block's placeholder parameter receives the topic.
More from this test: Lists & laziness (1), Regexes & grammars (1), Scoping & phasers (1), Signatures & dispatch (4).
binding-failure-priors-and-hintRaku++ passesRakudo passes- 1
The error for a Failure refused by a typed parameter opens with "Earlier failure:", the failure and its backtrace, then "Final error:" and the type check.
"Earlier failure:\n boom\n" … "\nFinal error:\n "
- 2
The binding error of an
@parameter given a Hash, a Map or a Pair, named or positional, goes on ". You have to pass an explicitly typed array, …"; an Int gets no such hint.
callables-method-rw-capture-requiredRaku++ passesRakudo passes- 5
The assignment type-check message renders the offending value the same way the binding message does, quoted and elided.
More from this test: Classes, roles & the MOP (2), Signatures & dispatch (3).
cannot-map-message-suggestionRaku++ passesRakudo passes- 1
The message of X::Cannot::Map ends with its suggestion on a line of its own.
(1,2).map(5): "Cannot map a List using '5'\nDid a * (Whatever) get absorbed by a list?"
catch-before-leaveRaku++ passesRakudo passes- 1
The
CATCHthat takes an error runs before theLEAVEphasers of the blocks between it and thedie; those blocks are left (LEAVE, UNDO,tempandletrestored) only once the handler is done. - 2
An outer
CATCHsees thetemp/letvalues and the$*xof the dying block still in place, and.resumegets back into the block that died.
More from this test: divergences (1).
catch-by-handRaku++ passesRakudo passescatch-in-methodRaku++ passesRakudo passes- 1
A
CATCHblock inside a method handles exceptions thrown in that method, and when nothing is thrown it does not run and does not supply the method's return value.
conformance-phase2-introspectionRaku++ passesRakudo passes- 6
A
Failure's.handledis assignable. - 7
A bare
failwith no argument carries anX::AdHoc, so.exception.messageanswers.
More from this test: Containers & assignment (1), Hashes & sets (1), I/O & processes (1), Classes, roles & the MOP (1), Scoping & phasers (1), Signatures & dispatch (2), Types & coercion (1).
control-handled-leaves-block-lax-package-var-str-warnsRaku++ passesRakudo passes- 1
A
CONTROLhandler whosewhenordefaultmatched a warning and did not.resumeconsumes the warning and leaves the block that declared the CONTROL, as a CATCH leaves its block.
More from this test: Scoping & phasers (1), Stringification (1).
control-warn-and-datetime-attrsRaku++ passesRakudo passes- 1
warnraises aCX::Warncontrol exception that the innermost dynamically enclosingCONTROLblock can intercept; a handler that calls.resumesuppresses the default print, and one that does not leaves it standing.CONTROL { when CX::Warn { .resume } }silences awarn - 2
A
CONTROLblock does not catch adie, and awarnissued inside a CONTROL handler goes to the next outer handler.
More from this test: Classes, roles & the MOP (1).
dd-failure-not-sunk-and-exception-rakuRaku++ passesRakudo passes- 1
ddreturns Nil, so a Failure it showed is not sunk and thrown after it.dd $x % 0e0prints the Failure and does not then throw it
More from this test: Stringification (1).
die-exception-composed-role-firstRaku++ passesRakudo passes- 1
dieof an object whose class names a role beforeis Exceptionthrows that object itself, not an X::AdHoc wrapping it.with
class D does Iterable is Exception, a CATCH afterdie D.newsees a D
dist-suite-quartetRaku++ passesRakudo passes- 18
Exception.throwrecords a backtrace whose frames answer.fileand.line.
More from this test: Dates & times (1), I/O & processes (1), Classes, roles & the MOP (4), Operators (1), Everything else (1), Regexes & grammars (2), Scoping & phasers (1), Signatures & dispatch (2), Stringification (1), Syntax & parsing (3), Types & coercion (2).
divide-by-zero-failureRaku++ passesRakudo passes- 2
trysets$!when its block returns aFailurerather than throwing.
More from this test: Numerics (1), divergences (1).
do-quietly-in-placeRaku++ passesRakudo passes- 2
A
dieor a Failure passes throughdo { … }andquietly { … }untouched; onlytryruns its block underuse fatal.
duration-slip-fail-destructureRaku++ passesRakudo cannot run it- 6
failin a block that another routine runs returns the Failure from the routine the block was written in, asreturndoes.in
sub q { ap({ fail "z" }); … }the Failure is returned fromq, not fromap
More from this test: Containers & assignment (1), Dates & times (2), Lists & laziness (2).
eco-blockers-2026-09-14Raku++ passesRakudo passes- 5
A backtrace frame is a
Backtrace::Frame, a type name a signature can use.
More from this test: I/O & processes (2), Operators (2), Signatures & dispatch (1), Stringification (1), Syntax & parsing (2).
empty-block-is-nilRaku++ passesRakudo passes- 1
A block that produces no value evaluates to
Nil: an empty sub or method,try {}, a taken but emptyif, and an empty loop body collected bydo for.
More from this test: Containers & assignment (1).
error-messages-rakudo-settledRaku++ passesRakudo passes- 1
Assigning to a method's return value throws
X::Assignment::ROwhose message names the returned value, not the invocant. inferred(-5).abs += 1dies with "Cannot modify an immutable Int (5)" - 3
A failed return-type check against a subset names the value it refused. inferred
subset RT of Any where Int; sub f(--> RT) { 1.8 }; f()dies with "Type check failed for return value; expected RT but got Rat (1.8)"
More from this test: Hashes & sets (1), I/O & processes (1), divergences (1).
eval-loop-controlRaku++ passesRakudo passes- 1
Loop control (
next,last,redo) inside anEVALstring controls the loop that encloses the EVAL.for ^3 { EVAL q[last] }ends thefor
exception-gist-message-methodRaku++ passesRakudo passes- 1
An Exception whose
messageis a method gists to that message.say $eprints the computed message, assay ~$edoes
exception-hierarchyRaku++ passesRakudo passes- 1
The
X::exception types form a class hierarchy with roles, so a subclass smartmatches its ancestors andCATCH { when X::TypeCheck {…} }catches its subclasses.X::TypeCheck::Binding::Parameter ~~ X::TypeCheck::Bindingis True - 2
A type-check failure binding an argument to a signature parameter throws
X::TypeCheck::Binding::Parameter, while a failed:=to a typed variable throws plainX::TypeCheck::Binding.
exception-messages-and-mop-mutatorsRaku++ passesRakudo passes- 1
EVAL 'x', :lang<bar>throws a typed exception object, not a bareStr. - 2
X::NoDispatcherhas its.redispatcherattribute set and its message reads "<redispatcher> is not in the dynamic scope of a dispatcher". - 3
X::Str::Match::xcarries agotattribute and a proper message. inferred - 4
Type-check error messages render the offending value with
.raku— a Str keeps its quotes, a List separates with commas, a Hash uses colon-pair form — and elide past 23 characters, keeping 20 plus....
More from this test: Containers & assignment (1), Classes, roles & the MOP (2).
exception-new-messageRaku++ passesRakudo passes- 1
X::Method::NotFound and X::Numeric::DivideByZero made with
.newhave a defined.message.
exception-new-messagesRaku++ passesRakudo passesexe-condition-binder-valueRaku++ passesRakudo passes- 2
An
if EXPR -> $x { … } else { … }that is a routine's last statement is the routine's return value.a routine ending in
if self.elems -> \elems { "have {elems}" }with 3 elements answers "have 3"
exe-fail-in-routineRaku++ passesRakudo cannot run it- 1
failinside a routine returns its Failure from that routine (or throws it underuse fatal), and in the mainline, with no routine around it,failisdie.q(-1) // "failed"is"failed"whenqfails
exe-mechanical-nativeRaku++ passesRakudo passes- 2
$!belongs to the routine: atryin a called sub does not rewrite its caller's$!. - 9
A block whose value is a variable's (
{ $p }) hands that value back unsunk, so a Failure in it does not throw at the statement that calls the block.
More from this test: Containers & assignment (1), Classes, roles & the MOP (1), Scoping & phasers (1), Signatures & dispatch (3).
exe-outer-step-native-opsRaku++ passesRakudo passes- 3
A
trywhose block returns a live Failure answers Nil with$!set; withno fatalin the block the Failure is the value; and a Failure already handled passes through as the value with$!Nil. - 4
A Failure used as a subscript throws the exception it carries.
@a[1 div 0] = 5throws instead of storing into@a[2]Also held by
failure-as-subscript. - 6
$failure.handledis assignable, toTrueand back toFalse.$failure.handled = True
More from this test: Native types & NativeCall (2).
exe-sinks-discarded-valuesRaku++ passesRakudo passes- 2
A value discarded at statement level is sunk: an unhandled Failure throws, and a lazy
.mapor agatherwritten as a statement runs its block.try { "abc".Int; … }leaves the block at the first statement
exe-try-fatalRaku++ passesRakudo passes- 2
A
tryblock's implicituse fatalmakes the call sites written inside the block throw a Failure they get back, except in a boolean or definedness context; it does not make afaildie inside the routines called.try { rgfail() // 'caught' }answers 'caught' whenrgfailfails - 3
A Failure built as an argument inside a
try, as intry f(Failure.new("x")), reaches the binder of the routine called instead of being thrown first. - 4
A
failwritten directly inside atryblock dies.
fail-in-mainline-block-throwsRaku++ passesRakudo passesfailure-as-subscriptRaku++ passesRakudo passes- 2
A Failure also throws as a hash key, under
:exists, as an element of a slice or junction subscript, and as the argument of theAT-POSand*-KEYmethods of a built-in Array or Hash.%h{$f} = 5throws for a Failure$f
failure-detonates-on-any-methodRaku++ passesRakudo passes- 1
Calling a method that Failure does not itself provide on an unhandled Failure throws the exception it carries.
"x".Int.elemsthrows
failure-detonationRaku++ passesRakudo passes- 1
An unhandled Failure throws when its value is used, in arithmetic or
.Intas much as in stringification, and when it is sunk. - 2
Asking about a Failure does not throw:
$f ~~ Failure,//,||,orelseand the negated identity!===all answer quietly. - 3
The first thing that touches a Failure marks it handled, so it answers differently the second time. inferred
failure-mess-and-backtraceRaku++ passesRakudo passes- 1
A Failure answers
.backtrace, where it was made, and.mess, its message and that backtrace, without throwing. - 2
An exception never thrown has no backtrace: its
.backtraceis Nil, a Failure's own exception too. - 3
A type check that refuses a Failure opens its message with the Failure's
.mess, so afailin a sub names that sub's frame.
for-as-block-value-is-not-sunkRaku++ passesRakudo passesgrand-review-c1-interpRaku++ passesRakudo passes- 5
A
returnin the mainline, outside any routine, is an error and the program exits non-zero.a program whose mainline runs
returnexits with code 1 - 9
A method body sinks its non-final statements.
- 10
A
dieinside the replacement block ofs///or inside a user-defined infix applied to objects propagates to the caller.
More from this test: Containers & assignment (1), I/O & processes (1), Numerics (7), Operators (4), Scoping & phasers (4), Signatures & dispatch (3), Stringification (1), Strings & Unicode (1).
interpolated-block-error-lineRaku++ passesRakudo passes- 1
A runtime error in a
{…}block of a multi-line string names the line the block is on, while an interpolated$x.nope()on a later line names the statement's line.
list-array-semantics-sheetRaku++ passesRakudo passes- 20
An unknown adverb on an array subscript throws X::Multi::NoMatch. inferred
@a[0]:foothrows X::Multi::NoMatch
More from this test: Containers & assignment (7), Lists & laziness (11), Stringification (3), Types & coercion (2).
method-return-as-statementRaku++ passesRakudo passes- 1
EXPR.return(Mu.return) returns the invocant from the routine it is written in, asreturn EXPRdoes..return if .is-applicable($message)returns the topic from the enclosing routine
module-unblock-batchRaku++ passesRakudo passes- 3
An explicit
CATCHin atryblock replaces try's implicit swallow: an exception the handler itself throws, or one that nowhen/defaultmatched, propagates past thetry.
More from this test: Operators (1), Signatures & dispatch (1), Types & coercion (1).
multi-method-nomatch-signaturesRaku++ passesRakudo passes- 1
A multi method no candidate takes is refused with a line for each candidate's signature after "none of these signatures matches", a role's candidate naming the class that composed the role.
A.new.m("x"): "Cannot resolve caller m(A:D: Str:D); none of these signatures matches" then(A $:: Int, *%_)
multi-nomatch-dispatcher-captureRaku++ passesRakudo passes- 1
X::Multi::NoMatch carries
.dispatcher, the routine called, and.capture, the arguments as a Capture with the invocant first for a method.
More from this test: Operators (1).
native-smartmatch-and-whatever-valuesRaku++ passesRakudo passes- 8
A block-final
iforgiveninsidedo { … }gives the block its value.my $x = do { if 1 { 'y' } else { 'n' } }is'y'
More from this test: Operators (5), Types & coercion (3).
needle-compile-clusterRaku++ passesRakudo passes- 5
Reading past the end of a Blob with
nqp::readuint,.read-uint16,.read-num32or.read-num64throws an exception whose message startsMVMArray: read_buf out of bounds. inferredBlob.new(0xf9, 0).read-uint16(-1)dies withMVMArray: read_buf out of bounds offset -1 start 0 elems 2 count 2
More from this test: Classes, roles & the MOP (1), Everything else (1), Signatures & dispatch (2), Stringification (2).
needle-type-object-no-matchRaku++ passesRakudo passes- 2
The capture an X::Multi::NoMatch message prints names the invocant's definedness and writes a Bool named argument as the adverb it was.
m(A:D: Str:D);:iand:!i, not:i(Bool)
More from this test: Strings & Unicode (1).
nested-sub-backtrace-fileRaku++ passesRakudo cannot run it- 1
A backtrace frame for a
my subdeclared inside a module's routine names the module's file together with the line in that file.
next-return-in-expression-cooperativeRaku++ passesRakudo passes- 2
A
returnas the left operand oforreturns at once, so the right operand never runs.(return 5) or say 'x'returns 5 and prints nothing
nqp-exception-ops-and-whereRaku++ passesRakudo passes- 1
nqp::newexception,nqp::setmessage,nqp::setextype,nqp::setpayloadandnqp::throwbuild and throw an exception by hand, and one typednqp::const::CONTROL_WARNis caught in aCONTROLblock and resumes with.resume.
More from this test: Everything else (1).
open-failure-is-loudRaku++ passesRakudo does not pass- 2
The exception of a failed
opensmartmatchesX::AdHoc, and its.payloadis the message.
More from this test: I/O & processes (3), divergences (1).
pdf-family-2026-09Raku++ passesRakudo passes- 35
The
elsebranch ofwith/withoutaliases the tested value as its topic.
More from this test: Containers & assignment (8), 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).
plain-object-any-list-methodsRaku++ passesRakudo passes- 3
.invertof something that is not a Pair dies "Type check failed in invert".
More from this test: Lists & laziness (3).
precomp-method-call-flagsRaku++ passesRakudo passes- 2
Under
use fatal,so f()tests the Failure thatfreturns instead of throwing it. inferred
private-method-notfound-payloadRaku++ passesRakudo does not pass- 1
Calling a missing private method throws
X::Method::NotFoundwhose.methodis the bare name, whose.privateis true, and whose message beginsNo such private method.the message reads
No such private method '!wrong'
More from this test: Compile-time errors (1).
pseudo-package-beats-labelRaku++ passesRakudo passes- 1
A statement label cannot shadow a pseudo-package: under a loop labelled
OUTER(orMY,OUR,CORE,SETTING,UNIT,OUTERS,CALLER,CALLERS,DYNAMIC,LEXICAL,CLIENT),next OUTER,last OUTERandredo OUTERname the pseudo-package and die because no candidate takes it.OUTER: for 1..2 -> $i { for 1..2 -> $j { next OUTER if $j > $i; print "$i$j " } }prints11then diesCannot resolve caller next(OUTER:U) - 3
A label named
COMPILING,PROCESS,PARENTor like a type name is found as a label bynext,lastandredo. - 4
From language version 6.e,
next OUTERunder a loop labelledOUTERpasses the package as the iteration's value instead of dying. - 5
next,lastandredoact on the loop their argument labels in every spelling —next(FOO),next $label,last(FOO)— and a statement modifier after the argument (redo $l if …) still applies. - 6
nextgiven a type object that is not a Label does not succeed: no candidate ofnexttakes it. inferred - 7
A
Labelobject has.next,.lastand.redomethods.
More from this test: Compile-time errors (1).
rakudo-t-language-gaps-2Raku++ passesRakudo passes- 9
no fatalinside atryblock keeps a Failure a Failure. - 16
In 6.e,
nextandlasttake a value as payload. inferred
More from this test: Compile-time errors (1), Hashes & sets (1), Lists & laziness (2), Operators (2), Regexes & grammars (4), Scoping & phasers (1), Signatures & dispatch (1), Syntax & parsing (1).
rakuglaze-round-4Raku++ passesRakudo passes- 1
A
tryblock is underuse fatal.tryfatalizes a Failure from a method call tooAlso held by
rakudo-t-language-gaps-2. - 2
An
EVALinside atryblock is not under thetry'suse fatal. inferred - 4
An
EVAL'd unit's ownCATCHhandles an error that dies deeper down in it. inferred - 6
diewith an object that is not an Exception throwsX::AdHoccarrying that object. inferred
More from this test: Hashes & sets (2), Lists & laziness (1), Classes, roles & the MOP (1), Operators (1), Scoping & phasers (1), Signatures & dispatch (1), Types & coercion (2).
rakuglaze-round-6Raku++ passesRakudo passes- 10
Exception.failmakes the routine that calls it return a Failure wrapping the exception.
More from this test: Concurrency (1), Hashes & sets (2), I/O & processes (1), Lists & laziness (2), Classes, roles & the MOP (1), Regexes & grammars (1), Scoping & phasers (1), Syntax & parsing (2).
repl-echo-ruleRaku++ passesRakudo cannot run it- 1
A loop statement evaluates to
Nil, for instance as the last statement of a sub or of an EVAL, while a loop written as an expression (do for,(for …)) yields its values.
More from this test: Everything else (1).
return-from-when-in-loopRaku++ passesRakudo passes- 1
returnfrom inside awheninside aforleaves only its own routine, and the caller's following block runs every one of its statements.
roast-3log-batch1Raku++ passesRakudo passes- 5
A caught exception's backtrace lists the setting's throw/die frames and every bare block it passed through.
- 8
A bare
failwith no argument uses the routine's own$!.
More from this test: Dates & times (1), Hashes & sets (1), I/O & processes (3), Lists & laziness (2).
roast-3log-batch2Raku++ passesRakudo passes- 10
returninside a routine-levelwhen/defaultreturns from that routine only, not from its caller too.
More from this test: Modules (1), Numerics (1), Classes, roles & the MOP (6), Everything else (1), Regexes & grammars (5), Scoping & phasers (1), Syntax & parsing (1).
roast-sweep-runtimeRaku++ passesRakudo cannot run it- 23
.resumeon a caught exception carries on at the statement after the one that died. inferred - 55
A routine whose body is the stub
...answers a Failure holdingX::StubCodewhen called. inferred
More from this test: Compile-time errors (4), Concurrency (2), Containers & assignment (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).
routine-scoped-match-and-when-lastRaku++ passesRakudo passes- 2
lastinside a barewheninside aforends only that loop and has no effect on a loop in the caller.
More from this test: I/O & processes (1), Classes, roles & the MOP (1), Regexes & grammars (1).
string-position-out-of-range-failureRaku++ passesRakudo passes- 1
.index,.rindex,.indices,.containsand.substr-eqwith a negative start position (or one past what an Int holds) return a Failure holding an X::OutOfRange whosewhatis "Position in calling 'index'" and whose range is a Str."abc".index("a", -1)fails with "… out of range. Is: -1, should be in 0..3"
superscript-call-but-bool-redo-copy-and-friendsRaku++ passesRakudo passes- 3
redobinds anis copyparameter afresh from the original argument.
More from this test: I/O & processes (1), Lists & laziness (1), Signatures & dispatch (2), Stringification (1), Syntax & parsing (1), Types & coercion (1).
symlink-and-x-ioRaku++ passesRakudo passes- 2
The
X::IOexception classes can be constructed directly with.new.X::IO::Dir.new(...)returns an exception object - 4
An exception object whose class carries a
messageattribute reports that attribute's value, not the type name, when.throwis called on it.
More from this test: I/O & processes (2).
temporal-out-of-rangeRaku++ passesRakudo passes- 1
A standard
X::exception built by hand renders its message from its attributes, soX::OutOfRange.new(what => …, got => …, range => …)has a defined.messageand a non-empty.gist.
More from this test: Dates & times (1).
throw-from-small-framesRaku++ passesRakudo passes- 2
A
diewith no argument raises the current$!again.
top100-roots-2026-09-02Raku++ passesRakudo does not pass- 15
A
dieinside a usertrait_mod:<is>handler propagates to the code compiling the declaration that carries the trait. - 16
nextused as an operand, as inmy Str $s = %h{$_} // next, skips the rest of the iteration before the typed assignment happens.
More from this test: Containers & assignment (1), 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).
try-block-sink-and-trailing-catchRaku++ passesRakudo passes- 1
tryandquietlyhand their block's value on in its container, asdodoes, and a value in a container is not sunk.try { $result = await $completion; CATCH { default { … } } }does not sink the Proc in$result - 2
A
CATCHorCONTROLwritten last is the block's last statement: the statement before it runs in sink context inside the block, so what sinking throws goes to thatCATCH, and the block answers Nil.try { await $completion; CATCH { default { } } }catches the X::Proc::Unsuccessful of the sunk Proc
try-statement-is-a-block-frameRaku++ passesRakudo passes- 1
The statement form
try EXPRis a frame of its own in the backtrace, astry { … }is. - 2
An in-place
try,doorquietlyblock is in.backtrace.listbut not in the printed backtrace.
More from this test: Scoping & phasers (1).
typecheck-exception-built-by-handRaku++ passesRakudo passes- 1
An
X::TypeCheckexception built with.newrenders its.messagefrom its attributes, as one that was thrown does.X::TypeCheck::Assignment.new(symbol => '$x', got => 42, expected => Str).messageis defined
typed-exception-payloadsRaku++ passesRakudo does not passuninit-warning-names-and-placeRaku++ passesRakudo cannot run it- 1
The "Use of uninitialized value" warning names the variable or element the value was read from and ends with the routine and line, as
warndoes.it names
$u,@a[2],%h{'k'}, orelementfor an operand of~
More from this test: Numerics (2), Syntax & parsing (1).
when-condition-whatever-curryRaku++ passesRakudo passes- 1
A
whencondition containing*is curried once into a WhateverCode and called with the topic, so the arm is taken only when it answers true.given $d { when * < 1 {…} when * >= 1 {…} }takes the arm the topic satisfies;*.chars == 3and!(* < 1)work as conditions
zef-install-clusterRaku++ passesRakudo passes- 1
A
givenblock whosewhenclauses all miss evaluates toFalse, the smartmatch result of the lastwhen, notAny. - 3
A labeled loop may directly follow
gather, as ingather LABEL: for … { next LABEL }. - 5
next()andlast()written with parentheses are the control operators themselves and compose inside expressions, as innext() R, DEBUG(...) if COND.
More from this test: Containers & assignment (1), Modules (1), Types & coercion (1).