Classes, roles & the MOP
Attributes, construction, inheritance, role composition, and the metaobject protocol.
361 rules from 196 tests. 179 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.
attribute-store-sourcesRaku++ matches Rakudo on all 29 probes- 1
Filling an attribute is the assignment its sigil makes:
C.new(a => X),has @.a = Xand$obj.a = Xleave whatmy @a = Xleaves, and the%forms whatmy %h = Xleaves, with the same refusals.
exe-nestedRaku++ matches Rakudo on 19 of 25 probes- 4
A class, role, enum, subset or grammar declared inside a routine or block behaves as one declared at the top level, including when two scopes use the same name. inferred
own-namesakeRaku++ matches Rakudo on all 37 probes- 1
A top-level class that takes a core type's name is a type of its own, and the name means the class wherever its declaration is in scope: as a term, a parameter, variable, attribute or return type, a parent, in
whenand in~~. - 2
A class that takes a core type's name prints as the plain name, and the core type is untouched and still reachable.
shadow-classRaku++ matches Rakudo on 276 of 296 probes- 1
A user class named like a built-in type is a type of its own:
.isa,~~,===, a parameter type and a multi candidate all tell it from the core type, forclassand formy class.
shadow-instance-methodsRaku++ matches Rakudo on all 122 probes- 1
A user class named like a built-in type answers its own methods on an instance, ahead of any built-in method of the same name.
shadow-roleRaku++ matches Rakudo on 37 of 38 probes- 1
role Int …makes the nameInta role where the declaration is in scope.
shadow-type-methodsRaku++ matches Rakudo on all 150 probes- 1
A user class named like a built-in type answers its own methods on the type object, ahead of any built-in method of the same name.
user-class-firstRaku++ matches Rakudo on 47 of 50 probes- 1
A class the program declares answers its own methods before any built-in method of the same name, on an instance and on the type object, whether it is named like a built-in type or inherits from one, and through an indirect call, a role,
handlesand FALLBACK. - 2
A built-in method is reached on a user class's object only by falling through to a core parent.
6e-gatingRaku++ passesRakudo cannot run it- 14
A subset's
.^verreports the language revision it was declared under.subset Even of Int where * %% 2; Even.^veris6.dor6.e - 31
The
.Callablemethod exists only from 6.e: it finds a method by name or returns a Failure.under 6.e
42.Callable("Str") ~~ Methodis True and42.Callable("nope")is a Failure
More from this test: Dates & times (2), Exceptions & control flow (1), Hashes & sets (3), I/O & processes (2), Lists & laziness (8), Numerics (1), Operators (1), Everything else (2), Regexes & grammars (2), Scoping & phasers (2), Signatures & dispatch (1), Strings & Unicode (6), divergences (1).
anton-batch-round2Raku++ passesRakudo passes- 7
A user-defined
method ^parameterizehandlesT[…]on that type.Uses[7, 8]runs the metamethod with 7 and 8 - 8
.^set_namerenames a type, and the same role parameterization always yields one and the same type.$tagged ~~ Tag[42]is True for a value mixed withTag[42]earlier
More from this test: Hashes & sets (3), Native types & NativeCall (1), Regexes & grammars (3), Signatures & dispatch (1).
array-op-args-getc-get-and-friendsRaku++ passesRakudo passes- 7
class GLOBAL::evodeclares the classevoin GLOBAL, not a class namedGLOBAL::evo.
More from this test: Compile-time errors (1), Hashes & sets (1), I/O & processes (1), Numerics (1), Signatures & dispatch (2).
array-type-metaRaku++ passesRakudo passes- 1
.^array_typeanswers the element type of a buffer value and of theutf8/utf16/utf32type objects, and is refused onblob8and on bareBuf.blob32.new(1).^array_type.^nameisuint32;utf16.^array_type.^nameisuint16
at-param-binding-nonpositionalRaku++ passesRakudo passes- 3
A multi-dimensional subscript
$obj[1;0]on an object whose class defines its ownAT-POScallsAT-POS(1, 0).$obj[1;0]callsAT-POS(1, 0)
More from this test: Native types & NativeCall (1), Signatures & dispatch (1).
attr-container-typeRaku++ passesRakudo passes- 1
has %.x is SomeTypemakes the attribute an instance of that class or role, not a plain Hash.with
has %.c is C,$h.c.^nameisC;has %.q is Setgives a Set
attr-default-block-placeholderRaku++ passesRakudo passes- 1
A placeholder variable inside a block literal in an attribute default belongs to that block.
has &.seqLeftSepForm = { ($^a, $^b) }compiles
More from this test: Compile-time errors (1).
attr-read-siteRaku++ passesRakudo passesattr-smiley-typecheckRaku++ passesRakudo does not pass- 1
An attribute's
:D/:Usmiley is checked against the slot's final value at construction: a:Dattribute wants a defined value and a:Uone an undefined value, whether it came from a default or a.newargument, and nothing is checked when the attribute got no value.has Int:D $.awith a bad default or argument throwsX::TypeCheck::Attribute::Default
attribute-shadowed-by-other-sigilRaku++ passesRakudo passes- 1
A subclass that declares an attribute its parent also declares, with another sigil, keeps its own accessor for it.
class A { has @.data }; class B is A { has %.data }; B.new.datais{}(a Hash) - 2
In one class, two attributes of one name and different sigils whose public one is the non-
$attribute keep that accessor.has $!x; has @.xanswers.x - 3
A subclass's private attribute (
has &!d) does not hide its parent's public accessor or constructor argument of the same name (has $.d). - 4
The qualified call
$o.A::data,.rakuandAttribute.get_valueread the attribute of the class and sigil they name when a subclass has one of the same name and another sigil. - 5
A parent's attributive parameter (
submethod BUILD(:$!x),method set($!x)) writes the parent's attribute, not a subclass's attribute of that name.
attribute-store-type-checksRaku++ passesRakudo passes- 1
An assignment to an attribute is type-checked like one to a variable, and the refusal names the attribute by its
$!name and shows the value refused, whether reached as$!x = …or as.x = …through anis rwaccessor. - 2
A
:Dattribute refuses a type object (and aNilreset to an undefined default), and a:Uattribute refuses a defined value.
attribute-trait-argument-shapesRaku++ passesRakudo passes- 1
An attribute trait's argument may be written without parentheses, as
{…}for a Hash or<word>for a word.has $.x is column{ :name<y>, :!nullable }passes a Hash;is column<rootpage>passes a word
More from this test: Signatures & dispatch (1).
attribute-user-traitsRaku++ passesRakudo passes- 2
doeson an Attribute meta-object mixes the role in place, and the role's accessors read and write that same object.
audited-language-gaps-4Raku++ passesRakudo passes- 1
A user trait on an anonymous sub runs with every argument it is given, and a block among the trait's arguments is not the sub's body.
sub (…) is memoized(%c, {…}) {…}
More from this test: Compile-time errors (1), Hashes & sets (1), Everything else (2).
augment-composes-roleRaku++ passesRakudo passes- 1
augment class X does Role { }composes the role into the class, even when the augment body is empty.augment class Rat does Precise { }gives Rat the role's methods
battery-proto-new-x-stash-write-positionRaku++ passesRakudo passes- 1
A class's own
proto method new(|) {*}replaces the default constructor, so an all-named call that nomulti method newcandidate takes is X::Multi::NoMatch rather than falling toMu.new.Color.new(rgb => [22, 42])throws X::Multi::NoMatch
More from this test: I/O & processes (1), Modules (1).
battery-regressions-v5Raku++ passesRakudo passes- 1
An attribute typed with an
our subsetaccepts a conforming default at its declaration. inferred
More from this test: Hashes & sets (1), I/O & processes (1), Modules (2), Operators (1), Regexes & grammars (1), Signatures & dispatch (2).
binding-slots-ops-create-invocantRaku++ passesRakudo passes- 5
.CREATEallocates an object without runningBUILDor attribute initialisers: an@or%attribute holds its empty container and a nativeintattribute is 0. - 6
A method whose invocant is declared
is rwcan assign to it, which vivifies the caller's undefined variable.my BinaryHeap::MinHeap $h; $h.push(...)leaves$ha heap - 7
.pushon an undefined variable typed with a class that definespushcalls that class's method, while an untyped undefined scalar autovivifies an Array.
More from this test: Containers & assignment (2), Operators (2).
bson-simple-and-hash-agnosticRaku++ passesRakudo passes- 5
An instance of a class that derives from
IntorStrand adds nothing but roles holds the built-in's value while keeping its own type.class Int64 is Int does Marker { }:Int64.new(-42) == -42andInt64.new(7).^nameisInt64 - 8
A qualified call to a built-in class's method,
self.Mu::Str, reaches the built-in method rather than the override that made the call.
More from this test: Containers & assignment (4), Dates & times (1), Hashes & sets (1), Modules (1), Operators (1), Signatures & dispatch (2), Stringification (1), Strings & Unicode (1), Types & coercion (1).
build-attributive-param-unpassedRaku++ passesRakudo passes- 1
An attributive parameter of
BUILDthat is not passed (submethod BUILD(:$!name)with noname) stores the parameter's default (Any, or the parameter's type) in the attribute, through the attribute's type check.has Str $.swithsubmethod BUILD(:$!s)and nospassed refuses the Any - 2
When
BUILDhas an attributive parameter for an attribute and it is not passed, the attribute's own default (has $.m = 3) is not applied.
build-binds-required-defined-attrRaku++ passesRakudo passes- 1
An attribute declared
has Int:D $.rows is requiredmay be bound by the class's ownsubmethod BUILD(:$!rows!): the:Dcheck does not fail before BUILD has bound the argument.
build-initializes-required-attr-undefinedRaku++ passesRakudo passes- 1
is requiredasks whether construction initialized the attribute, not whether it holds a defined value: a BUILD that writes the slot satisfies it even when what it writes is undefined.class E { has $.t is required; submethod BUILD(:$!t) { } }; E.newlives - 2
An
is requiredattribute still throws X::Attribute::Required when BUILD never writes the slot (it ignores the argument, only reads the attribute, or skips the assignment), when only TWEAK writes it, and when there is no BUILD and no argument.
More from this test: divergences (1).
buildall-role-hook-belongs-to-composerRaku++ passesRakudo passes- 1
A composed role's
BUILDorTWEAKis flattened into the composing class and is discarded when the class declares its own; it does not get a separate turn during construction. - 2
Object construction runs the
BUILDof every class in the MRO, least-derived first and each exactly once, and likewise each class'sTWEAK. inferredwith
class auth-response is api-response, the parent'sBUILDruns as well as the child'sAlso held by
build-tweak-walk-the-mro.
builtin-type-find-method-answers-noRaku++ passesRakudo passes- 1
.^find_methodon a built-in type object answers a false value for a name the type does not have.Set.^find_method('red-compat-nonexistent-method')is falsyAlso held by
find-method-from-table.
callable-context-callme-rawRaku++ passesRakudo passes- 2
Calling a class by name with arguments invokes its
CALL-MEmethod, in preference to theT(x)coercion reading, and can write back to its arguments.Trap(my $*OUT)runsTrap'sCALL-ME
More from this test: Signatures & dispatch (1), Syntax & parsing (1).
callables-method-rw-capture-requiredRaku++ passesRakudo passes- 2
A statement-level
my method m(Int:D: $x) {…}is aMethod:&m.^nameisMethod, and calling it bindsselfand the invocant parameter. - 6
is required("reason")puts the reason into the missing-attribute error: after a comma and a newline before "but" when a reason is given, and a comma and a space when it is not.
More from this test: Exceptions & control flow (1), Signatures & dispatch (3).
calls-rakudo-refusesRaku++ passesRakudo passes- 2
A computed method call
."…"()whose name is a private one is refused. - 5
method !q { … }declares the private method!q.
More from this test: Concurrency (1), Strings & Unicode (2).
can-on-a-mixin-over-a-builtinRaku++ passesRakudo passes- 1
.canon a built-in value with a role mixed in finds the built-in type's methods as well as the role's.(Date.new(…) does Role).can('day-of-week')is not empty
can-on-builtin-dateishRaku++ passesRakudo passes- 1
A built-in value answers
.cantruthfully for its built-in methods.$date.can('day-of-week')and$date.can('week-number')are true for a Date
can-on-builtin-typesRaku++ passesRakudo passes- 1
.canand.^canon a built-in type object find the methods that type has, including ones added byaugment.Rat.can('Str')is not empty
categorical-method-nameRaku++ passesRakudo passes- 1
A method may carry a categorical name with an arbitrary category, such as
method mod:<null>($/).
More from this test: Compile-time errors (1).
class-traits-and-module-gatesRaku++ passesRakudo cannot run it- 5
A user-defined
istrait on a class dispatches to the user'strait_mod:<is>after the class exists, and an exception thrown by the trait body propagates. - 6
.^add_roleadds a role to a class at runtime.
More from this test: Signatures & dispatch (1), Syntax & parsing (2).
clone-semanticsRaku++ passesRakudo passes- 2
A
.clonetwiddle for an@or%attribute assigns into the attribute's container rather than binding the raw value..clone(a => (1,2))leaves@!aan Array that.pushcan extend - 3
.clonetwiddles set only attributes that have accessors; a private attribute is not reachable, even when it isis built. - 4
.clonetakes named arguments only; a positional argument makes the call fail. - 6
callsame,nextsameandnextwithfrom a user method that overrides a built-in method redispatch to the built-in.a user
method clonecancallsameto the built-incloneAlso held by
redispatch-past-a-builtin-ancestor.
More from this test: Containers & assignment (1), Operators (1), Scoping & phasers (1).
conformance-phase2-introspectionRaku++ passesRakudo passes- 8
.selfreturns the invocant.
More from this test: Containers & assignment (1), Exceptions & control flow (2), Hashes & sets (1), I/O & processes (1), Scoping & phasers (1), Signatures & dispatch (2), Types & coercion (1).
control-warn-and-datetime-attrsRaku++ passesRakudo passes- 3
DateTime.^attributesandDate.^attributeslist the type's attributes, from$!yearto$!daycountand&!formatter.
More from this test: Exceptions & control flow (2).
cool-methods-not-on-plain-classRaku++ passesRakudo passes- 1
A class with nothing above it but user classes,
AnyandMuhas none ofCool's methods:.index,.substr,.uc,.chars,.sqrt,.lines,.IOand the rest throw X::Method::NotFound on an instance and on the type object.class A { }; my A $a; $a.indexthrows X::Method::NotFound - 2
On a plain class a
FALLBACK, a.^add_fallbackor ahandles *delegation receives a call named like one ofCool's methods. - 3
On a plain class,
split,fmtandchrs(multisAnydeclares), and.Int,.Numericand.Realon an instance, throw X::Multi::NoMatch.
core-class-extended-in-placeRaku++ passesRakudo passes- 2
A class declared with the name of a core class it inherits from (
class DateTime is DateTime is exportin a module) takes as parent what the name meant before the declaration. - 3
Wrapping a core method through
.^find_method('name').wrap(…)takes effect on later calls of that method.DateTime.^find_method('in-timezone').wrap(…) - 4
A method computed by
.^add_fallbackand a$d.&subcall receive the invocant's container, so anis rwparameter can replace$d, while a value invocant (my \d = …,3.&m) does not match anis rwmulti candidate.
More from this test: Dates & times (1).
core-type-roles-and-iterator-defaultsRaku++ passesRakudo passes- 1
Hash is a Map, and Map, Hash, Range, Pair, Seq and the QuantHash family have fixed MROs in which Seq does Sequence.
- 2
.^rolesanswers for core types, with:!transitivetoo. - 3
A role type object's REPR is
Uninstantiableand a buffer's isVMArray. - 5
A role parameterized with a value shows the value's type in its name, while distinct values still make distinct parameterizations.
R["x"].^nameisR[Str], andR[5]is notR[6]
More from this test: Lists & laziness (1), Syntax & parsing (1).
cro-core-clusterRaku++ passesRakudo passes- 7
A
::Ttype capture of a parameterized role resolves inside the role's method bodies, whether the role is composed or punned.R[Str].t.^nameisStrwhen methodtreturnsT - 8
A parameterized role that takes a value parameter can be punned, with its default or an explicit argument.
More from this test: Concurrency (4), Containers & assignment (1), Regexes & grammars (1), Scoping & phasers (1).
cro-family-clusterRaku++ passesRakudo passes- 2
self.bless(...)or$obj.new(...)called on an instance builds a fresh object. - 6
A
subdeclared in a class body is callable from that class's methods.
More from this test: Hashes & sets (1), Lists & laziness (1), Regexes & grammars (3), Syntax & parsing (2).
cro-install-engine-fixesRaku++ passesRakudo passes- 12
Native integer types answer
.^nativesizeand.^unsigned.int8.^nativesize,uint8.^unsigned
More from this test: Concurrency (4), I/O & processes (1), Lists & laziness (1), Regexes & grammars (1), Signatures & dispatch (7), Strings & Unicode (1), Syntax & parsing (2).
cro-live-clusterRaku++ passesRakudo passes- 4
Assigning through the accessor of a public
@.or%.attribute stores into the attribute even withoutis rw. - 5
only methodis a valid method declarator.
More from this test: Containers & assignment (1), Modules (1), Scoping & phasers (1), Signatures & dispatch (1), Syntax & parsing (2).
data-dump-clusterRaku++ passesRakudo passes- 2
.^methodsincludes public attribute accessors and declared methods but not private methods.for
class E { has $.public; method r(Str $a) { }; method !p(Int $x) { } }, the names includepublicandrbut notp - 3
A method's reflected
.signature.paramsstart with the invocant and end with the implicit*%_.E.^lookup('r').signature.params[*-1].nameis%_ - 5
Attribute.get_valueon a type object throws.$attr.get_value(E)dies - 6
.^methodson a built-in type such asAnyanswers without dying.Any.^methodsreturns - 7
.^canon a built-in value is truthy for a method it has and falsy for one it lacks.for a Match
$m,?$m.^can('orig')is True and?$m.^can('nosuchmethod')is False
More from this test: Stringification (1), Syntax & parsing (1).
dbdish-native-and-list-defectsRaku++ passesRakudo passes- 8
An attribute default written as a comma list,
has @.a = 1,2,3, initializes the array with every element. - 11
A subscript whose base is a plain method call writes through to the object's field on assignment. inferred
- 13
An attribute marked
is requiredis satisfied whenBUILDfills it.
More from this test: Containers & assignment (2), Lists & laziness (1), Native types & NativeCall (5), Regexes & grammars (3), Signatures & dispatch (1), Syntax & parsing (2).
default-constructor-positionalRaku++ passesRakudo passes- 1
A core type whose
newis Mu's — Str, Any, Cool, Match, Exception, Capture, Signature — takes named arguments only.Str.new(1)dies "Default constructor for 'Str' only takes named arguments" - 2
Str.newbuilds its string from thevaluenamed argument, also when called on an instance."x".new(:value<a>)is "a"
default-object-rendererRaku++ passesRakudo passes- 4
An attribute's sigil is a container type that coerces its value, for a declared default and for a value passed to
.new.has @.a = (1,2)holds an Array andhas %.h = (a=>1)a Hash
More from this test: Stringification (3).
definiteness-types-and-runtime-classesRaku++ passesRakudo passes- 2
Metamodel::ClassHOW.new_type(:name, :ver, :auth)creates a class at runtime on which.^add_methodand.newthen work. - 3
The
.HOWspellings of metamodel calls take the type as their first argument ($t.HOW.add_method($t, …)), where.^passes it implicitly; a metaclass's ordinary methods such as.isaand.gistare not forwarded to that argument.
More from this test: Types & coercion (1).
dist-suite-quartetRaku++ passesRakudo passes- 5
$obj[$i] = vwrites the real element when the object's method hands it back withreturn-rw @!arr[$i]. - 11
Attribute defaults are evaluated in the declaring class's scope, so class-body constants are visible when
.newis called from another compilation unit. - 13
A Code object with a role mixed in by
butstays callable. - 14
A method wrapped through
.^find_method(...).wrapruns the wrapper with(self, |args), andcallsamereaches the original.
More from this test: Dates & times (1), Exceptions & control flow (1), I/O & processes (1), Operators (1), Everything else (1), Regexes & grammars (2), Scoping & phasers (1), Signatures & dispatch (2), Stringification (1), Syntax & parsing (3), Types & coercion (2).
dot-attr-through-read-only-accessorRaku++ passesRakudo passes- 1
$.xin a method is$(self.x), so through a read-only accessor an assignment to it is refused as modifying an immutable value.has $.b = 42; method bb { $.b = 666 }dies "Cannot modify an immutable Int (42)" - 2
Through a read-only accessor,
$.n++,$.n += 1and$.h<k> = 1in a method change only a copy and leave the attribute as it was.
dot-equals-new-attr-defaultRaku++ passesRakudo passes- 1
has T $!x .= newinitializes the attribute toT.newat construction.has Lock::Async $!lock .= newgives each object a lock instance
dot-method-call-and-formatterRaku++ passesRakudo passes- 1
$.name(ARGS)isself.name(ARGS): a method call that receives those arguments.method viaDot($n) { $.greet($n) }returns whatself.greet($n)returns
More from this test: Dates & times (2), Signatures & dispatch (1).
ecosweep-2026-09Raku++ passesRakudo passes- 9
A nested class shadows an outer class of the same name when it is used as an attribute type in its enclosing class. inferred
More from this test: I/O & processes (2), Modules (3), Operators (1), Scoping & phasers (2), Signatures & dispatch (1), Types & coercion (1).
ecosweep-batch-fiveRaku++ passesRakudo passes- 12
An attribute default sees the constructed value of an earlier attribute.
with
has Any:U $.type = Str; has Code:D $.converter = pick-conv($!type);,.new(:type(Int))builds the converter for Int - 16
An enum's
.HOWis aMetamodel::EnumHOWand its.WHOholds the members.Order.WHO{'Same'} === Same
More from this test: Hashes & sets (1), Native types & NativeCall (2), Operators (1), Regexes & grammars (1), Scoping & phasers (2), Signatures & dispatch (4), Syntax & parsing (1), Types & coercion (2).
ecosweep-batch-threeRaku++ passesRakudo passes- 6
A computed
:ver($expr)adverb on a class declaration is evaluated at declaration and answers.^ver.my constant $V = '7.7'; class Stamped:ver($V) { }; Stamped.^verisv7.7
More from this test: Hashes & sets (1), Native types & NativeCall (3).
enum-does-role-and-archetypesRaku++ passesRakudo passes- 2
An enum's metaobject says it is composalizable, and its archetypes answer 1 or 0.
More from this test: Syntax & parsing (1).
enum-how-add-enum-valueRaku++ passesRakudo passesexception-messages-and-mop-mutatorsRaku++ passesRakudo passes- 6
.^mixincalled on an object mixes the role into that object. inferred - 7
.^add_methodworks on a built-in type.
More from this test: Containers & assignment (1), Exceptions & control flow (4).
exe-accessor-assignRaku++ passesRakudo passes- 2
An assignment through an accessor,
$obj.name = v, follows the attribute's own assignment rules: a%attribute takes the list as pairs and a typed attribute refuses a value of another type. inferredafter assigning pairs through a
%attribute's accessor,$g.map<a>reads the value
More from this test: Containers & assignment (1).
exe-attribute-traitsRaku++ passesRakudo passes- 3
A class whose parent is a core value type, such as
is Int, can be constructed with a positional value. inferreda class declared
is Intaccepts.new(7)
More from this test: Types & coercion (1).
exe-mechanical-nativeRaku++ passesRakudo passes- 3
A mutating method named at run time (
$buf."$write"(…)) acts on the variable itself, as a written method name does.
More from this test: Containers & assignment (1), Exceptions & control flow (2), Scoping & phasers (1), Signatures & dispatch (3).
exe-required-and-attributive-paramsRaku++ passesRakudo passes- 2
An attributive parameter (
submethod BUILD(:$!t),method set($!x),*%!opts) writes the attribute, a private one included, and its parameter default applies.
More from this test: Containers & assignment (1).
exe-routine-scope-shapesRaku++ passesRakudo passes- 2
In a role's method,
$?CLASSis the class that composes the role.$?CLASS.^namein a role method is the composing class's name, not "::?CLASS"
More from this test: Modules (1), Scoping & phasers (1), Signatures & dispatch (1).
exporthow-declare-monitor-locksRaku++ passesRakudo passes- 1
A package declarator installed through
EXPORTHOW::DECLAREbuilds its types with the given metaclass, whoseadd_methodreceives, and may wrap, every method.with a
monitorwhose metaclass wraps methods in a lock, four threads bumping a counter 1,000 times each end at 4,000
failure-can-is-failures-ownRaku++ passesRakudo passes- 1
.canand.^canon a Failure answer for Failure's own methods and Any's only, not for every name.with no
$*RED-DB,try $*RED-DB.^can("table-name-formatter")is False
More from this test: Scoping & phasers (1).
fallback-after-any-methodsRaku++ passesRakudo passesfallback-nil-and-slicesRaku++ passesRakudo passes- 1
A class's
method FALLBACKis called for every unresolved method, receiving the method name and then the original arguments.
More from this test: Containers & assignment (2), Lists & laziness (1), Syntax & parsing (1).
find-method-from-tableRaku++ passesRakudo passes- 2
A role answers
.canfrom its own methods and Any's.Cool.can('chars')is not empty andNumeric.can('abs')is empty
generic-role-bodiesRaku++ passesRakudo does not pass- 1
A statement in a parametric role's body that uses a role parameter runs once per parameterization with the parameters bound, and the role's methods see that run's lexicals.
my T $v .= newinR[Int]is0and inR[Str]is"" - 2
A class declared in a parametric role's body whose parent is parameterized by a role parameter belongs to that parameterization.
class A is Array[T]inR[Int]isR::G::A[Int] - 3
T:D,T:U,T()andT:D()written in a parametric role resolve to the type the parameter is bound to, not the name as written. - 6
has @.a is A, withclass A is Array[Int], keeps A's element type. - 7
A parametric role's body runs for every way of parameterizing it:
also does R[…],is R[…],R.^parameterize(…), and a constrained capturerole R[Numeric ::T].
More from this test: Scoping & phasers (1), Syntax & parsing (2).
get-attribute-for-usageRaku++ passesRakudo passes- 1
.^get_attribute_for_usage('$!x')answers the Attribute meta-object of that name, looking only at the class's own attributes.
getopt-long-parameter-traitsRaku++ passesRakudo passes- 3
Mixing in a role with a named argument,
does R(:a(9)), presets the role's attributea, as the positional formdoes R(7)does.after
does R(:a(9))the object's.ais9and its type name isC+{R} - 4
A routine with a role mixed in is no longer exactly a
Sub: its.WHATdiffers fromSuband its type name carries the role's name.&marked.WHAT !=== Subis True
More from this test: Containers & assignment (1), Lists & laziness (1), Signatures & dispatch (2), Stringification (1), Types & coercion (1), divergences (1).
grammar-ancestryRaku++ passesRakudo passesgrammar-how-is-grammarhowRaku++ passesRakudo passes- 1
A grammar's HOW is a
Metamodel::GrammarHOW, which is aMetamodel::ClassHOW.G.HOW ~~ Metamodel::GrammarHOWisTrue
handles-assign-keyRaku++ passesRakudo passes- 1
$obj{k} = vcalls anASSIGN-KEYthat the object gets throughhandlesdelegation, keeping the object intact.with
has %!s handles <AT-KEY EXISTS-KEY ASSIGN-KEY>,%!C{'k'} = 42leaves$t.C.^nameasTCand$t.C{'k'}as 42
handles-delegation-satisfies-and-dispatchesRaku++ passesRakudo passes- 1
A
handlesdelegation declared on a method satisfies a role's stubbed-method requirement, as one declared on an attribute does, whether the class's own, inherited, or brought by a composed role.class C does R { method Pages handles <page> { … } }composes when R declaresmethod page { ... } - 2
A
handlesdelegation inherited from a second parent class or brought by a role in a laterdoesclause is dispatched, whether it is declared on a method or on an attribute.with
class D is B is A, a method delegated byhandlesin A is callable on a D
has-list-item-traitsRaku++ passesRakudo passes- 1
An attribute in a parenthesised
has (…)list takes its own traits before its default.has ($.z is rw = 42)declares a read-write$.zwith the default 42
hash-into-array-attributeRaku++ passesRakudo passes- 1
A Hash given to an
@attribute at construction, as an attribute default or in.clone, is spread into its pairs, asmy @a = %hdoes; a Map, a Set and a Bag likewise.class A { has @.data }; A.new(data => {a => 1}).datais[a => 1] - 2
Only an itemized hash (
$%h,%h.item, a$hholding one) given to an@attribute stays one element.
how-compose-sees-declared-methodsRaku++ passesRakudo passes- 1
A public attribute's accessor is made by the base metaclass
compose, and only when no method of that name exists, so a customcomposesees only the declared methods in.^method_tablebefore itscallsame.before
callsame,$.barhas put nobarin.^method_table
how-declaration-hooksRaku++ passesRakudo passeshow-legacy-exporthowRaku++ passesRakudo passeshttp-useragent-clusterRaku++ passesRakudo passes- 7
Assigning with
$.attr = venforces the attribute's declared type, subsets included, and the error names the qualified type.has RequestMethod $.m is rwrejects a value outside the subset
More from this test: Everything else (1), Regexes & grammars (3), Signatures & dispatch (1), Syntax & parsing (2).
implementation-detail-is-a-traitRaku++ passesRakudo passes- 1
is implementation-detailon a class is a trait, not a superclass.
indirect-method-call-nativeRaku++ passesRakudo passesinterp-meta-mixin-block-sig-allomorphRaku++ passesRakudo passes- 2
butdoes not mix in a plain class:1 but Bwith a non-role classBis rejected, while1 but Numericis legal.
More from this test: Lists & laziness (1), Regexes & grammars (1), Signatures & dispatch (1), Strings & Unicode (1), Types & coercion (1), divergences (1).
invocant-smiley-and-role-multisRaku++ passesRakudo does not pass- 2
is built(:bind)on a private attribute lets.newset it by name. - 7
A role's own multi candidates do not conflict with one another when the role is composed.
More from this test: Modules (1), Signatures & dispatch (4), Syntax & parsing (1).
io-path-subclass-boxedRaku++ passesRakudo passes- 2
A qualified method call
self.IO::Path::slurp(|c)from a role method mixed in over the object reaches the built-in method.
More from this test: I/O & processes (1).
iospec-versioning-enums-filetestRaku++ passesRakudo passes- 4
.^set_ver,.^set_authand.^set_apiset what.^ver,.^authand.^apireport, and av0.0.1literal given to.^set_verreads back asv0.0.1.
More from this test: I/O & processes (4), Types & coercion (1).
is-deeply-strict-and-anton-batchRaku++ passesRakudo passes- 8
.^find_methodfinds an attribute accessor, and answers nothing for a method a built-in type does not have.Int.^find_method('type')is undefined - 10
Passing
Nilfor an attribute to.newresets it to its default:Anyfor an untyped attribute and the type object for a typed one.class Slot { has $.t; has Int $.n }; Slot.new(t => Nil, n => Nil).n.rakuisInt - 13
C but Ron a bare type name yields a type object with the role mixed in, and a role mixed into a grammar at run time brings its rules.(Plain but Marked).markismarkedand(Plain but Marked).DEFINITEis False
More from this test: Hashes & sets (1), I/O & processes (3), Lists & laziness (1), Operators (3), Everything else (1), Regexes & grammars (2), Signatures & dispatch (1), Syntax & parsing (2).
issue-110-constructor-typecheckRaku++ passesRakudo passes- 1
A value given by name to
new,blessor.cloneis assigned to its attribute, so it must pass the type check that$!name = valuewould.has Str $.srefusesAny,has A $.arefuses an unrelated object,has int $.irefuses a Str - 3
A
Nilgiven for an attribute in the constructor resets the attribute to its default (itsis default, when it has one) instead of being stored.
More from this test: Types & coercion (1).
issue-172-stub-completion-sees-types-betweenRaku++ passesRakudo passes- 1
The body of the declaration that completes a stub
my class A {...}sees the types declared between the stub and it, while a type declared after the completion is unknown to it.my class A {...}; my role RH {}; my class A { my class Inner does RH {} }compiles - 2
A class stubbed with
my class A {...}is usable between the stub and its completion further down.
issue-182-create-on-instanceRaku++ passesRakudo passes- 1
.CREATEon an instance allocates another object of the invocant's type, soself.CREATEworks in a method called on an instance, for a user class and a built-in alike. - 2
.CREATEon a built-in type object makes an instance of that type.Mu.CREATE.WHAT === Mu;Int.CREATEis an Int andHash.CREATEa Hash - 3
A class's own
method CREATEis called when.CREATEis invoked on its type object.P.CREATEcalls P'smethod CREATE
issue-221-array-list-which-identityRaku++ passesRakudo passes- 2
Two temporary reference objects have distinct
.WHICHvalues, whether Lists, Hashes, Bufs, Instants or instances of a class.(1,2).WHICH eq ('1','2').WHICHis False, and so isFoo.new.WHICH eq Foo.new.WHICH
More from this test: Hashes & sets (1), Lists & laziness (1).
issue-225-fallback-gets-nameRaku++ passesRakudo passes- 1
A class's
FALLBACK, ahandles *delegation or a.^add_fallbackreceives.namelike any other method the class lacks, sincenameis no method of Mu or Any; without one it is X::Method::NotFound.class Wrapper { has $.o; method FALLBACK($n, |a) { $!o."$n"(|a) } }:Wrapper.new(o => …).namereaches FALLBACK
issue-43-private-method-quoted-nameRaku++ passesRakudo does not pass- 1
self!"$m"()calls the private method whose name the quoted string evaluates to at run time.
More from this test: Syntax & parsing (1).
issue34-handles-renamingRaku++ passesRakudo passes- 1
The renaming form of
handles, with pairs, exposes each key as a method that calls the value on the attribute.with
has IO::Handle:D $.handle handles(:print<print>, :flush<flush>, :terminal<t>),.terminalcalls.ton the handle - 2
A
handlesdelegation is a method on the class, so it outranks a method of the same name from a composed role, stub or not.
issue63-typed-container-elementsRaku++ passesRakudo passes- 3
.cloneis shallow: the original and the clone share the one Array an@.dataattribute holds, andself.data = […]list-assigns into that shared Array.
More from this test: Containers & assignment (2).
lizmat-containers-and-dispatchRaku++ passesRakudo passes- 2
A user class may have an attribute named
$!reified, andnqp::bindattr($obj, T, '$!reified', $buf)sets that attribute without changing what the object is. - 4
A Code object answers
.fileand.linewith where it was declared.
More from this test: Hashes & sets (1), Signatures & dispatch (1), Strings & Unicode (1), Syntax & parsing (1).
math-sparsematrix-installRaku++ passesRakudo passes- 5
Assigning through an
is rwaccessor delegated withhandleswrites the delegate's attribute.
More from this test: Lists & laziness (1), Native types & NativeCall (2), Operators (2).
metamodel-mixin-and-trait-importsRaku++ passesRakudo passes- 1
$obj does Role(arg)presets the role's single public attribute, even when the role also has private attributes. - 2
A role mixed into an Attribute meta-object can read and write its own private attributes from its methods.
- 3
A role's private attribute does not shadow a role method of the same name.
has $!columnbesidemethod column - 6
.^add_multi_methodadds a multi candidate to a class.
More from this test: Modules (1), Signatures & dispatch (1).
method-also-role-composition-2026-09-02Raku++ passesRakudo passes- 1
With Method::Also,
is also<alias>on a proto or multi method inside a role adds the alias to every class that composes the role, not to the role itself, and adds nothing for a plain method in a role.
More from this test: divergences (1).
method-call-shapes-and-core-tablesRaku++ passesRakudo passes- 4
@.m(…)and@.m: …are calls onselfin list context. - 5
An anonymous
submethod (…) {…}is a term, and a Submethod's type is Submethod, a Routine that is not a Method. - 6
returns ::?CLASSon a method resolves to the enclosing class. - 7
.$varwhere$varholds a Str invokes the string as code and so fails; it is not a method call by name. - 8
.WHEREand.VARon a WhateverCode answer about the WhateverCode itself. - 9
The default constructor refuses a positional Pair.
- 11
Int, Num and Hash answer
.^method_table, andTrue.enumsanswers the Bool enumeration. - 13
Cool methods called on an undefined
AnyareX::Method::NotFound, and so are numeric methods on a Block. - 14
A
my classdeclared inside a method is named under the method's class.my class Xin a method of Q isQ::X
More from this test: Containers & assignment (1), Numerics (1), Operators (1), Strings & Unicode (1), Syntax & parsing (2).
method-introspection-and-indirect-callRaku++ passesRakudo passes- 1
A method's
.signature.countand.aritycount the invocant.method file(Bool $v = True)has count 2 and arity 1 - 2
The signature of a multi method group, as
.^lookupreturns it, is its proto's.
More from this test: Signatures & dispatch (2).
method-trait-mixinRaku++ passesRakudo passes- 1
$obj does R($v)instantiates a role that has exactly one attribute, presetting that attribute from the positional. - 2
doeson a routine mixes in place, so a role mixed into a method by a trait is visible through a later.^lookup.a method tagged
is constraint(…)smartmatchesConstraint - 3
A
trait_mod:<is>handler declared in a class's own body, and the enums its signature is typed by, are available to that class's method traits. - 4
trait_mod:<of>($method, T)is callable as a routine. - 5
A trait on a
protomethod applies to the dispatcher that.^lookupreturns, and that dispatcher is a Method.
mixed-in-attribute-meta-accessRaku++ passesRakudo passes- 1
An Attribute meta-object with a role mixed in answers
.^get_attribute_for_usagefor the role's attributes, and their.get_valuereads and writes them.self.^get_attribute_for_usage('$!' ~ $name).get_value(self) = $valueworks in a trait on an Attribute
mixin-keeps-parameterized-ofRaku++ passesRakudo passes- 1
A type mixin on a parameterized container type keeps the element type.
(Array[Foo] but R).ofisFoo
module-compat-clusterRaku++ passesRakudo passes- 1
A bare
does Ron a parameterized role binds the role parameters' defaults. - 3
.HOW.archetypeson a class answers.nominalTrue and.parametricFalse.?C3.HOW.archetypes.nominalis True - 4
An
@-sigiled typed attribute's.typeisPositional[T], and.type.ofis the element type.C4.^attributes[0].type.^nameisPositional[L4] - 7
A user-defined
trait_mod:<is>on an attribute is called with the Attribute meta-object, and a role it mixes in stays on the object that.^attributesreturns.after
is json-name(...), the attribute smartmatchesJSON::Name::NamedAttributeand answers.json-nameAlso held by
attribute-user-traits.
More from this test: I/O & processes (1), Operators (1), Scoping & phasers (3), Signatures & dispatch (2).
module-page-sextetRaku++ passesRakudo passes- 7
Assigning a list through the accessor of an
@attribute list-assigns its elements rather than storing one itemized array.$obj.nodes = @liststores the elements - 13
A user
istrait on a method dispatches totrait_mod:<is>with its angle word-list argument and with$*PACKAGEbound. - 14
A
T.HOW does Rmixin persists, and a mixed-incomposemethod runs at class composition.
More from this test: Numerics (1), Regexes & grammars (7), Stringification (2), Strings & Unicode (1).
module-supplied-package-declaratorRaku++ passesRakudo passes- 1
A module can add a package declarator through
EXPORTHOW::DECLARE: once it maps a word to a metaclass,word Foo { … }andunit word Foo;declare a class whose.HOWis that metaclass.my package EXPORTHOW { package DECLARE { constant model = MetamodelX::Red::Model } }enablesmodel Foo { … } - 2
For a type declared with a custom HOW, every
.^methodcall reaches that HOW, the MOP operations of its parentMetamodel::ClassHOWstay available, and itscomposeruns with its errors propagating.
mop-metamodelRaku++ passesRakudo does not pass- 1
An
Attributemeta-object reads and writes its slot on an instance with.get_valueand.set_value. - 2
.^ver,.^authand.^apireport a type's declared version, authority and API, and.^attribute_tablegives its attributes by name. inferred - 3
.^composereturns the type, and.^set_namerenames it. inferred - 4
Attribute.newtogether with.^add_attributeadds an attribute to a class being built at runtime. - 5
.^declares_methodis true only for a method declared in the class itself, not an inherited one, and.^find_method_qualifiedlooks a method up in a named class. inferred
mu-roles-and-itemizationRaku++ passesRakudo passes- 1
.doesis true for a role in a built-in type's ancestry,.isais strict class inheritance and false for a role, and smartmatch agrees with.doesfor instances and types.Date.does(Dateish)is True andDate.isa(Dateish)is False - 2
Mu.newandAny.newgive a defined, truthy instance of the root type;Mu.newgists asMu.new. - 4
$obj.Capturegives the object's public attributes as named arguments, read through their accessors, so a method overriding an accessor wins.
More from this test: Containers & assignment (1), Stringification (1).
named-sub-term-declares-nameRaku++ passesRakudo passes- 3
A
multi methodwritten as a term in a class body,my $m = multi method foo(Int $x) {…}, is a method of the class.
More from this test: Compile-time errors (1), Scoping & phasers (1).
native-buffer-symbol-and-nullRaku++ passesRakudo cannot run it- 3
.doesis True for the buffer roles a buffer does, while.isais False for a role.$buf.does(Blob)and$buf.does(buf8)are True
More from this test: Native types & NativeCall (4).
needle-compile-clusterRaku++ passesRakudo passes- 3
butapplied to a built-in type object yields a type object, which a value carrying the same mixin smartmatches and a plain value does not. inferred(Str but Tg).definedisFalse
More from this test: Exceptions & control flow (1), Everything else (1), Signatures & dispatch (2), Stringification (2).
new-array-attr-from-a-returned-seqRaku++ passesRakudo passes- 1
The default constructor fills an
@attribute from a lazy Seq passed as its named argument, storing it as list assignment does..new(a => f())withfreturning a.mapfillshas @.a
new-strays-and-virtual-accessorRaku++ passesRakudo passesnon-ascii-type-names-in-parser-guessesRaku++ passesRakudo passes- 4
handlestakes a class named in any script and delegates its methods.has $.b handles Éx
More from this test: Syntax & parsing (3).
package-gapsRaku++ passesRakudo passes- 3
.newon a package dies "You cannot create an instance of this type (P)".P.newforpackage P {}
More from this test: Compile-time errors (1), Modules (1).
package-relative-namesRaku++ passesRakudo passes- 2
A class declared inside a class body is named
Outer::Inner, and its short name still resolves inside the outer body, including inmy Inner $x .= new. - 4
.canreports built-in methods such asnewandgist, andparse/subparseon a grammar.
More from this test: Modules (2), Operators (1), Regexes & grammars (1).
package-symbols-and-package-howRaku++ passesRakudo passes- 2
Metamodel::PackageHOW,Metamodel::ModuleHOWandMetamodel::GrammarHOWprovide.new_type, asClassHOWand the role HOWs do.
More from this test: Modules (1).
parameterized-role-value-paramsRaku++ passesRakudo passes- 1
A parameterized role with value parameters (
role R[$x],role R[%h],role R[Bool :$opt]) binds the arguments ofdoes R[args]and makes them visible in its methods and submethods.
path-methods-on-any-valueRaku++ passesRakudo passes- 3
A user class's own method or FALLBACK answers before any IO::Path method of the same name.
Also held by
path-methods.
More from this test: I/O & processes (1), divergences (1).
pdf-family-2026-09Raku++ passesRakudo passes- 14
A routine may carry a
handlestrait and delegate:method m handles <a b>. - 21
A role mixed in at runtime gives its typed attributes their type object as the initial value.
- 22
.?methanswers Nil for a missing method even when the miss is reported against an ancestor type. - 23
A role composes the roles of the roles it composes.
- 24
A plain sub installed with
.^add_methodreceives the invocant as its first positional and keeps theselfof the closure it was made in. - 26
.^is_punsays whether a class is a role's pun and.^pun_sourcenames the role; an ordinary class is not a pun. - 28
.^mixinreblesses the object itself, so the original object then smartmatches the mixed-in role. - 31
A class that inherits from a built-in type and also composes a role still has the built-in type as a parent. inferred
- 32
A class derived from a built-in type gives its typed attributes their type object as the default. inferred
- 36
A user class built on
AttributeorParameteris backed by a working meta-object. inferred - 38
.new,.blessand.CREATEcalled on an instance construct another object of its type. - 46
A role mixed in at runtime also composes the roles that role composes.
- 57
nextwithfrom the.newof a class derived from a built-in type answers an instance of that class, not of the built-in. - 58
The constructor of a class derived from a built-in type builds that class however it was invoked, including when called on an instance. inferred
More from this test: Containers & assignment (8), Exceptions & control flow (1), I/O & processes (1), Lists & laziness (1), Modules (1), Numerics (1), Operators (1), Regexes & grammars (3), Scoping & phasers (4), Signatures & dispatch (9), Syntax & parsing (11), Types & coercion (3).
plain-object-any-mutatorsRaku++ passesRakudo passes- 1
.push,.append,.unshiftand.prependon an instance of a plain class, a Block or a Regex fail with X::Multi::NoMatch from Any's candidates, not with a missing-method error.class P { }; P.new.push(1)dies "Cannot resolve caller push(P:D: Int:D); none of these signatures matches:" - 2
.spliceon an instance of a plain class fails with an error naming a proto that has no candidates. - 3
.sumon an instance of a plain class asks for the object's.Numericand fails for want of one. - 4
Any's
.push,.append,.unshift,.prepend,.spliceand.sumare found on an object before its class'sFALLBACKmethod is tried. inferred
private-attr-not-inheritedRaku++ passesRakudo passesprivate-call-and-import-shadowingRaku++ passesRakudo passes- 1
A private method call is allowed anywhere lexically inside the declaring class, a routine with no
selfincluded, and is refused outside it.my multi rulify(Path::Finder:D $rule) { $rule!rules }in the class body compiles
More from this test: Modules (2).
private-call-resolves-in-its-packageRaku++ passesRakudo passes- 1
self!namereaches the private method of the class whose method makes the call — for a role's method, the class the role was composed into — not the object's most derived class.with
(Puppy.new but Violinist) but Diva, Puppy'sgreetcalls Puppy's own private method
private-method-result-writableRaku++ passesRakudo passes- 1
A Hash or Array that a private method returns is the attribute's own container, so a write through the call changes the attribute, as it does through a public method.
self!rec($k)<n>++changes the attribute, asself.rec($k)<n>++does
private-public-method-same-nameRaku++ passesRakudo passes- 1
A private
method !nameand a publicmethod nameare distinct and coexist:self.namecalls the public one andself!namethe private one.
proto-method-packageRaku++ passesRakudo passes- 1
A
proto methodor a multi-method group answers its declaring class from.package, the same as an ordinary method.
qualified-dispatch-and-nil-smartmatchRaku++ passesRakudo passes- 1
$obj.Class::methodcallsClass's method, reaching past the invocant's own override.self.Parent::methinside an override calls the parent's method, not the override again
More from this test: Operators (1).
quantifier-modifiers-and-anon-methodsRaku++ passesRakudo passes- 2
method {…}as a term builds aMethodthat takes its invocant as the first argument and bindsself."g".$m("h")passes"h"to the method's parameter
More from this test: Hashes & sets (1), Regexes & grammars (1).
rak-chain-install-gapsRaku++ passesRakudo passes- 3
$x but R(value)and$x but R<value>set the role's attribute before the role'sTWEAKruns.
More from this test: Concurrency (1), Hashes & sets (1), Signatures & dispatch (1), Types & coercion (2).
rakudo-t-language-gaps-1Raku++ passesRakudo passes- 6
A typed attribute defaulted to
Nilholds its type object.has IO::Handle $.x = NilholdsIO::Handle - 9
A parenthesized pair as a role argument,
R[(a => 1)], passes a Pair rather than a named argument.
More from this test: Compile-time errors (1), Containers & assignment (1), Lists & laziness (1), 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- 10
is Arrayon an attribute names the attribute's container type.
More from this test: Compile-time errors (2), Containers & assignment (1), Lists & laziness (2), Modules (1), Operators (2), Regexes & grammars (1), Scoping & phasers (1), Signatures & dispatch (1), Stringification (1), Syntax & parsing (1).
rakudo-t-language-gaps-4Raku++ passesRakudo passes- 1
A role's attribute composed into a class has that class as its
.package. - 2
A qualified method call naming a type the invocant does not inherit from is
X::Method::InvalidQualifier.self.No::Such::foois X::Method::InvalidQualifier - 9
$obj.attr = Nilresets the attribute to anis default(T)value instantiated from the role's type parameter.
More from this test: Compile-time errors (1), Operators (2), Regexes & grammars (1), Scoping & phasers (1), Stringification (1).
rakudo-t-language-gaps-5Raku++ passesRakudo passes- 4
The variants of a role group can be told apart by a required named parameter.
More from this test: Compile-time errors (1), Concurrency (1), Everything else (2), Signatures & dispatch (2), Stringification (1).
rakuglaze-round-4Raku++ passesRakudo passes- 13
A loop in a class body runs when the class is declared. inferred
More from this test: Exceptions & control flow (4), Hashes & sets (2), Lists & laziness (1), Operators (1), Scoping & phasers (1), Signatures & dispatch (1), Types & coercion (2).
rakuglaze-round-6Raku++ passesRakudo passes- 7
.^nominalizeunwraps a coercion type, a definite type and a subset to the nominal type.
More from this test: Concurrency (1), Exceptions & control flow (1), Hashes & sets (2), I/O & processes (1), Lists & laziness (2), Regexes & grammars (1), Scoping & phasers (1), Syntax & parsing (2).
redispatch-past-a-builtin-ancestorRaku++ passesRakudo passes- 2
A class inheriting from a built-in class lists that ancestor once in its
.^mro.class A is Exceptionhas the MROA, Exception, Any, Mu
refused-parent-leaves-no-typeRaku++ passesRakudo passes- 1
A class or role declaration refused for an unknown parent declares nothing, so the name stays undeclared and can be declared afresh.
after
try EVAL 'class C is nosuch {}',EVAL 'class C {}'is no redeclaration
roast-3log-batch2Raku++ passesRakudo passes- 12
A role group used before all its declarations are reached is built whole, even when a sibling scope has a role of the same name.
- 13
role R2[::T] does R1[::T]makesR2[Num]doR1[Num], in dispatch and in.^roles. - 14
self.R::mnames the parameterization of R that the calling code's type composed. - 15
A role group spans compilation units, each candidate keeps its own language revision, and
R.new/R[Str]pun the candidate that fits. - 16
A plain method call on a role group is the default candidate's method.
- 17
A 6.e role's
BUILD/TWEAKrun as role constructors when the role is composed into a 6.c class too.
More from this test: Exceptions & control flow (1), Modules (1), Numerics (1), Everything else (1), Regexes & grammars (5), Scoping & phasers (1), Syntax & parsing (1).
roast-last-filesRaku++ passesRakudo passes- 12
List and Any each declare an
elems, so.+elemson a List calls both. inferred
More from this test: Compile-time errors (1), Containers & assignment (2), Lists & laziness (2), Numerics (3), Operators (1), Scoping & phasers (2).
roast-sweep-dispatchRaku++ passesRakudo passes- 7
When no candidate of a user
multi method newmatches, the call falls toMu.new, which refuses positional arguments. inferred - 10
A method of a subclass run on an instance of its parent class dies when it reads a
$!xattribute that object does not have. inferred - 11
A subclass's multi-method group, as
.^find_method(…).candidates, lists the inherited candidates before its own. inferred
More from this test: Containers & assignment (1), Signatures & dispatch (7), divergences (1).
roast-sweep-parseRaku++ passesRakudo does not pass- 2
has T method name() {…}declares a method with return type T, which is checked on return (X::TypeCheck::Return), and stating a second return type with-->isX::Redeclaration. inferredmy class HM1 { has Int method foo() { 42 } }; HM1.foois42 - 8
has @.a of intkeeps its native element type, so storing a Str in it dies. inferred
More from this test: Compile-time errors (5), Operators (1), Syntax & parsing (1).
roast-sweep-runtimeRaku++ passesRakudo cannot run it- 8
A Failure returned from
BUILDis what.newanswers. inferred - 15
The
@attribute of a role mixed into an object starts as an empty Array. inferred - 24
has $.x does Rmixes the role into the attribute's initial value. inferred - 29
A role composing another role that declares the same attribute is refused when it is punned. inferred
- 32
Multi methods with different constraints composed from two roles do not conflict. inferred
- 42
A user trait on a variable receives the Variable object, named with its sigil, and what the trait mixes into
.varis on the variable afterwards. inferred - 45
A signature's type capture cannot be inherited from, but a parametric role may name its type parameter as the parent it hands to the class. inferred
- 46
Composing a class that was only stubbed is a composition error. inferred
More from this test: Compile-time errors (4), Concurrency (2), Containers & assignment (2), Exceptions & control flow (2), Hashes & sets (4), I/O & processes (3), Lists & laziness (5), Modules (2), Operators (4), Everything else (1), Regexes & grammars (1), Scoping & phasers (14), Stringification (1), Strings & Unicode (1), Types & coercion (3).
role-body-class-finds-the-originalRaku++ passesRakudo passes- 1
::?CLASSin a role body, outside its methods, is the class the role is being composed into, not Mu. - 2
A role body runs once per composition, before the role's methods reach the class, so
::?CLASS.^find_method('AT-KEY')captured there is the class's original method and not the role's override.my &AT-KEY := ::?CLASS.^find_method('AT-KEY')in a role overriding AT-KEY captures the built-in
role-build-fills-required-attrRaku++ passesRakudo passes- 1
A role's
is requiredattribute is checked after the BUILD the composing class took from the role has run, so the role'ssubmethod BUILD(:$!total)satisfies it.role R { has Real() $.total is required; submethod BUILD(Real:D() :$!total, *%phases) }composed into a class constructs with.new(:total(Inf)) - 2
The
is requiredattributes of the roles a role does (role R does Q) are checked at construction.
role-callsame-skips-composed-roleRaku++ passesRakudo passes- 1
callsamefrom a role's method does not reach the same-named method of a role it does, which composition removed, and answers Nil when nothing else is next; a parent class of the consuming class is still next.with
role S does B,callsamein S's method does not call B's
role-candidate-required-named-keyRaku++ passesRakudo passes- 1
A class's multi candidate overrides a role's only when the signatures are the same, required named parameters included.
with
class C does I { multi method m($a) }and I'sm($a, :$cast!),C.new.m(1, :cast)answers the role's
role-clash-through-roleRaku++ passesRakudo passes- 1
Composing a class is refused when a
multi methodand an onlymethodof the same name meet in it, even when one of them comes from a role that a composed role does.role S { multi method m($a) {} }; role R does S { method m {} }; class E does R {}dies "Cannot have a multi candidate for 'm' when an only method is also in the package 'E'" - 2
A method conflict between two parameterizations of one role names the role by its bare name for each of them.
the conflicting roles are reported as
(A, A), not(A[2], A[1])
role-concretizationRaku++ passesRakudo passes- 1
A class that
doesa parametric role gets the role's methods with the type parameters bound to that parameterization, so amulti method foo(T $t)composed fromR[Int]matches an Int argument. - 2
A class doing two parameterizations of one role,
does R[Str] does R[Int], keeps each parameterization's own type argument in the methods it composes from it.
role-conflict-messageRaku++ passesRakudo passes- 4
A stub method is no clash between roles, and multi candidates of different signatures from two roles merge.
More from this test: Compile-time errors (3).
role-does-native-array-genericRaku++ passesRakudo passes- 1
A parametric role may be declared doing
array[T]of its own type parameter; it is refused only once composed, an array not being composable.role A[::T] does array[T] { }compiles
role-group-candidate-by-valueRaku++ passesRakudo passes- 1
A class's
does W['B']composes the candidate of role groupWwhose signature the arguments fit, so a literal role parameter matches only its own value.with
role W['A']besiderole W['B'],does W['B']composes W['B'] and its methods - 2
Among role-group candidates that fit, the choice follows multi dispatch over their signatures: the narrowest types, then a literal,
whereor captured type that accepted, in declaration order, then the candidate taking exactly that many arguments. - 3
An untyped role parameter is typed
Mu. - 4
A role parameterization that no candidate of the group fits, or that leaves two candidates tied, throws X::Role::Parametric::NoSuchCandidate.
does W['C']with onlyrole W['A']androle W['B']declared is refused
role-group-candidate-does-bare-roleRaku++ passesRakudo passes- 1
A parameterized role may do the bare role of its own name declared before it:
role W { }; role W['X'] does W { }joins W's group and composes the earlier W.role W { }; role W['X'] does W { }compiles - 2
A run-time
$obj does W['X'], whererole W['X'] does W, gives the object the bare W's methods too. - 3
A role that does itself is refused.
role-how-specialize-wraps-specialize-withRaku++ passesRakudo passes- 1
When a class composes a role, the role metaobject's
specializeis called andspecialize_withruns inside it, so a dynamic variable declared by an overriddenspecializeis visible to an overriddenspecialize_with. - 2
A role metaobject that overrides only
specialize_withhas it called for each class that composes the role.
role-in-role-multi-candidates-joinRaku++ passesRakudo passes- 1
A role's own multi method candidates join those of a role it does, so a class doing the outer role dispatches among both sets.
with
role SQLMapping does BaseMapping, BaseMapping's('int' --> 'integer')candidate competes with SQLMapping's(Str $value)
role-metaclass-mixin-hooksRaku++ passesRakudo passes- 1
A role's own metaobject (
$*PACKAGE.HOWin its body, a ParametricRoleHOW) is the same object on every.HOW, so a role mixed into it stays and its methods are callable as$*PACKAGE.^name. - 2
A trait on a role declaration receives the role group, whose
.^candidates[0].HOWis the role's own metaobject, not the group's.role Foo is json-rpc-actor - 3
When a class composes a role, the role's metaobject's
specialize_withis called and the concrete role it makes is filled throughadd_method. - 4
nqp::getattr($concrete-how, Metamodel::ConcreteRoleHOW, '@!roles')reads a concrete role's roles. inferred
role-multi-siblings-differing-by-namedRaku++ passesRakudo passes- 1
Two multi method candidates of one role that differ only by a named parameter both survive composition into a class, and are no conflict when a second role has a candidate of that name.
a role with
multi method new($left, $right, :$cast!)andmulti method new($left, $right):Red::AST::Concat.new($left, $right)finds the plain one
role-parameter-reaches-body-subsRaku++ passesRakudo passes- 1
A role's value parameter is visible inside a
subdeclared in the role body.in a role with named parameter
$prefix,sub lookup($str) { EnumBits::{"$prefix$str"} }sees$prefix
role-params-and-bare-attributesRaku++ passesRakudo passes- 1
A role parameter is in scope for the role's attribute defaults, not only for its method bodies.
role Instruction[$ins] { has $.instruction = $ins } - 2
A twigil-less attribute,
has @items, can be read as well as assigned through its bare name@itemsinside the class. - 3
Punning a role whose parameters have defaults binds those defaults, so methods called on the pun see them just as they do through
does.
role-pun-binds-named-parametersRaku++ passesRakudo passes- 1
A role parameterization may carry both a positional and a named argument,
R[Type, :name<value>], and both are bound, including when the role is punned.BitEnum[MyBits, :prefix<BIT_>]binds$prefixto"BIT_" - 2
An enum type object passed as a role argument arrives as the type object and is not flattened into its pairs.
role-state-and-nested-assignRaku++ passesRakudo passes- 2
A nested subscript assignment
$obj<a><b> = vcalls the inner object'sASSIGN-KEY.
More from this test: Scoping & phasers (1), Types & coercion (1).
role-stub-first-missingRaku++ passesRakudo passes- 1
A class missing several of its roles' stub methods is told about one: a role's own stubs are named in declaration order, then those of the roles it composes, and the class's roles are checked last-
doesfirst.
roles-order-and-value-argumentsRaku++ passesRakudo passes- 1
.^roleslists a class's own roles last-declared first, each followed by the roles it does in the order itsdoesclauses are written..^rolesof a class declareddoes R2 does R5isR5 R2 R1 - 2
In
.^roles, a role parameterized by a value is named by the value's type.does R2[1]is listed asR2[Int] - 3
.^roleson a parameterized role's type object lists the roles that role does and does not include the role itself.R2[1].^rolesis empty
routine-mixin-attribute-and-direct-dispatcherRaku++ passesRakudo passes- 1
A role mixed into a routine with
doeskeeps the attributes its own methods write.after
meth does R; meth.set-json-rpc-name($name)the role's$!attrreads back the name
More from this test: Signatures & dispatch (1).
routine-scoped-match-and-when-lastRaku++ passesRakudo passes- 4
.^lookupanswersMufor a method the type does not have.
More from this test: Exceptions & control flow (1), I/O & processes (1), Regexes & grammars (1).
runtime-metamodel-surfaceRaku++ passesRakudo passes- 1
A class-level
is <name>trait whose name is lowercase and not a known type is dispatched to a usertrait_mod:<is>, not read as inheritance.unit model Foo is table<sqlite_master>applies a usertabletrait - 2
.^declares_method('NAME')answers whether the class itself defines the method, as opposed to inheriting it..^declares_method('TWEAK')
scalars-nil-junction-complex-dateRaku++ passesRakudo passes- 12
.CREATEallocates an object without runningBUILDorTWEAK.
More from this test: Concurrency (1), Containers & assignment (1), Dates & times (1), Numerics (3), Operators (1), Everything else (1), Stringification (1), Syntax & parsing (1), Types & coercion (1).
second-parent-attribute-defaultsRaku++ passesRakudo passessigilled-compile-time-classRaku++ passesRakudo passes- 1
$?CLASS, the sigilled spelling of::?CLASS, resolves to the enclosing class, including in aunit classbody.$?CLASS.^namein a class body is the class's name, notAny
sigilless-binds-the-containerRaku++ passesRakudo passes- 8
.clonedoes not share with the original an attribute that was bound to a variable.
More from this test: Containers & assignment (4), Signatures & dispatch (3).
sink-context-methodRaku++ passesRakudo passes- 1
A statement whose value is discarded calls the result object's user-defined
sinkmethod, and every top-level statement is in sink context.a bare statement
HTTP::Status.new: 404, 'Not Found'runs that class'smethod sink
statistics-distributions-clusterRaku++ passesRakudo passes- 1
.^method_nameslists the type's own method table: local methods, composed role methods and public accessors, without private or inherited methods.
More from this test: Lists & laziness (1), Signatures & dispatch (2), Syntax & parsing (1).
submethod-table-and-method-tableRaku++ passesRakudo passessubset-metamodel-for-sub-modelsRaku++ passesRakudo passes- 1
Metamodel::SubsetHOW.new_type(:name, :refinee, :refinement)creates a subset type at run time.(Metamodel::SubsetHOW but MetamodelX::Red::SubModelHOW).new_type: :$name, :refinee(model), :&refinement - 2
A subset answers
.^refineewith its base type and.^refinementwith its constraint. - 3
Each subset has a
.HOWobject of its own, so a role can be mixed into it withdoes.$s.HOW does Roledoes not die - 4
A user-defined
istrait on asubsetdeclaration is applied to the subset.subset Administrator is sub-model of User where *.role eq "admin"
subset-named-for-packageRaku++ passesRakudo passes- 1
A subset declared in a package is named for it,
myor not: its.^nameand.rakuare the long name, its gist and.^shortnamethe short one.class K { my subset S of Int }hasS.^nameK::S
subset-unknown-trait-and-new-type-nameRaku++ passesRakudo passes- 3
A subset made at run time by
Metamodel::SubsetHOW.new_typeunder a name already taken answers the name it was given.its name is
User, notUser+1
More from this test: Compile-time errors (1), divergences (1).
todo-small-divergencesRaku++ passesRakudo passesMore from this test: Concurrency (1), Containers & assignment (2), Lists & laziness (3), Operators (1), Regexes & grammars (1), Scoping & phasers (2), Stringification (3), Types & coercion (3).
todo-small-divergences-2026-10-11Raku++ passesRakudo does not pass- 13
A built-in value does not do a user-declared role that shadows a core role's name.
- 17
A class's own
BUILDthat ignores the argument for anis requiredattribute leaves the attribute unprovided, so construction fails.
More from this test: Containers & assignment (1), Operators (2), Scoping & phasers (1), Signatures & dispatch (2), Strings & Unicode (1), Syntax & parsing (3), Types & coercion (4), divergences (1).
top100-chunk-c-b1-2026-09-03Raku++ passesRakudo does not pass- 3
.^add_parenton a type made withMetamodel::ClassHOW.new_typeputs the parent in the type's.^mroonce it is composed;$t.HOW.add_parent($t, Parent)does the same.the MRO of the composed type is Derived, Base, Any, Mu
More from this test: Hashes & sets (1), Modules (1).
top100-roots-2026-09-02Raku++ passesRakudo does not pass- 7
nqp::create(self)in a user class makes an instance of that class, andnqp::getattr($pair, Pair, '$!key')and'$!value'read a Pair's parts.nqp::getattr(42 => "foo", Pair, '$!key')is42 - 13
Method.packageis the class or role that declares the method.Pkg.^lookup('m').package.^nameisPkg - 14
A role's
.HOWis not aMetamodel::ClassHOW, while a class's is. - 17
$.nameinside a method called on a type object is still a method call onself.
More from this test: Containers & assignment (1), Exceptions & control flow (2), Lists & laziness (1), Modules (1), Native types & NativeCall (3), Numerics (1), Regexes & grammars (3), Scoping & phasers (1), Stringification (1), Strings & Unicode (2), Syntax & parsing (3), Types & coercion (6).
tries-with-frequenciesRaku++ passesRakudo passes- 1
my $.xin a class or role body declares a lexical plus an accessor method of the bare name, which is composed into the class and callable on the type object.
More from this test: Hashes & sets (1), Lists & laziness (2), Operators (2), Signatures & dispatch (1).
unknown-parent-messageRaku++ passesRakudo passes- 3
A role's
istakes a class as its parent, the role's own type capture, or a trait atrait_mod:<is>candidate takes.role RC[::T] is T
More from this test: Compile-time errors (2).
user-class-named-ratRaku++ passesRakudo passes- 1
A user class may be named
Rat, and.newon it makes an ordinary object of that class.class Rat is Quadruped { has $.head = 1 }; Rat.newmakes an ordinary object
user-method-vs-mop-noopRaku++ passesRakudo passes- 1
A user-defined method named like a metamodel method (
compose,publish_method_cache,set_rw) is what.composecalls; only.^composereaches the metamodel.
xml-triad-backref-indirect-coerceRaku++ passesRakudo passes- 3
An attribute may be declared with a coercion type, as in
has IO::Path() $.filename.
More from this test: Regexes & grammars (1), Signatures & dispatch (1).
zef-load-fixesRaku++ passesRakudo passes- 2
$obj<key>and$obj[i]on an object call itsAT-KEY/AT-POS(including ones delegated byhandles), and:exists/:deletecallEXISTS-KEY/DELETE-KEY.
More from this test: Hashes & sets (1), Syntax & parsing (1).