Raku Cases › Classes, roles & the MOP

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 probes2026-11-28 · 2889ad4a
  1. 1

    Filling an attribute is the assignment its sigil makes: C.new(a => X), has @.a = X and $obj.a = X leave what my @a = X leaves, and the % forms what my %h = X leaves, with the same refusals.

exe-nestedRaku++ matches Rakudo on 19 of 25 probes2026-11-28 · 04a1722e
  1. 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 probes2026-11-28 · 32fcd90a
  1. 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 when and in ~~.

  2. 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 probes2026-11-28 · 04a1722e
  1. 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, for class and for my class.

shadow-instance-methodsRaku++ matches Rakudo on all 122 probes2026-11-28 · 04a1722e
  1. 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 probes2026-11-28 · 04a1722e
  1. 1

    role Int … makes the name Int a role where the declaration is in scope.

shadow-type-methodsRaku++ matches Rakudo on all 150 probes2026-11-28 · 04a1722e
  1. 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 probes2026-11-28 · 591c50cd
  1. 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, handles and FALLBACK.

  2. 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 it2026-08-19 · 387d2c88
  1. 14

    A subset's .^ver reports the language revision it was declared under.

    subset Even of Int where * %% 2; Even.^ver is 6.d or 6.e

  2. 31

    The .Callable method exists only from 6.e: it finds a method by name or returns a Failure.

    under 6.e 42.Callable("Str") ~~ Method is True and 42.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 passes2026-08-28 · 2421c094
  1. 7

    A user-defined method ^parameterize handles T[…] on that type.

    Uses[7, 8] runs the metamethod with 7 and 8

  2. 8

    .^set_name renames a type, and the same role parameterization always yields one and the same type.

    $tagged ~~ Tag[42] is True for a value mixed with Tag[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 passes2026-09-17 · 2e994990
  1. 7

    class GLOBAL::evo declares the class evo in GLOBAL, not a class named GLOBAL::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 passes2026-08-04 · eb43202e
  1. 1

    .^array_type answers the element type of a buffer value and of the utf8/utf16/utf32 type objects, and is refused on blob8 and on bare Buf.

    blob32.new(1).^array_type.^name is uint32; utf16.^array_type.^name is uint16

at-param-binding-nonpositionalRaku++ passesRakudo passes2026-10-06 · 7b3bb3cf
  1. 3

    A multi-dimensional subscript $obj[1;0] on an object whose class defines its own AT-POS calls AT-POS(1, 0).

    $obj[1;0] calls AT-POS(1, 0)

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

attr-container-typeRaku++ passesRakudo passes2026-08-04 · 97c617c3
  1. 1

    has %.x is SomeType makes the attribute an instance of that class or role, not a plain Hash.

    with has %.c is C, $h.c.^name is C; has %.q is Set gives a Set

attr-default-block-placeholderRaku++ passesRakudo passes2026-09-04 · edf6c77f · #60
  1. 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 passes2026-11-18 · 664e8acf
  1. 2

    $.x in a method body is the call self.x, so it calls a method of that name where one exists: the class's own, an inherited one, or one added later.

  2. 3

    In a method body $.list is an item and @.list is not, and a read-only $.x cannot be assigned through.

attr-smiley-typecheckRaku++ passesRakudo does not pass2026-07-24 · d757295d
  1. 1

    An attribute's :D/:U smiley is checked against the slot's final value at construction: a :D attribute wants a defined value and a :U one an undefined value, whether it came from a default or a .new argument, and nothing is checked when the attribute got no value.

    has Int:D $.a with a bad default or argument throws X::TypeCheck::Attribute::Default

attribute-shadowed-by-other-sigilRaku++ passesRakudo passes2026-10-15 · 16329a82
  1. 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.data is {} (a Hash)

  2. 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 @.x answers .x

  3. 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. 4

    The qualified call $o.A::data, .raku and Attribute.get_value read the attribute of the class and sigil they name when a subclass has one of the same name and another sigil.

  5. 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 passes2026-09-30 · bcc92b0f
  1. 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 an is rw accessor.

  2. 2

    A :D attribute refuses a type object (and a Nil reset to an undefined default), and a :U attribute refuses a defined value.

attribute-trait-argument-shapesRaku++ passesRakudo passes2026-09-11 · cc95e49f
  1. 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 passes2026-08-14 · e3994d54
  1. 2

    does on 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 passes2026-10-05 · f3b1fe01
  1. 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 passes2026-09-16 · b22d82fc
  1. 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 passes2026-10-10 · 0c3540cf
  1. 1

    A class's own proto method new(|) {*} replaces the default constructor, so an all-named call that no multi method new candidate takes is X::Multi::NoMatch rather than falling to Mu.new.

    Color.new(rgb => [22, 42]) throws X::Multi::NoMatch

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

battery-regressions-v5Raku++ passesRakudo passes2026-09-29 · 78d68426
  1. 1

    An attribute typed with an our subset accepts 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 passes2026-08-30 · 945285cc · #47
  1. 5

    .CREATE allocates an object without running BUILD or attribute initialisers: an @ or % attribute holds its empty container and a native int attribute is 0.

  2. 6

    A method whose invocant is declared is rw can assign to it, which vivifies the caller's undefined variable.

    my BinaryHeap::MinHeap $h; $h.push(...) leaves $h a heap

  3. 7

    .push on an undefined variable typed with a class that defines push calls 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 passes2026-08-31 · 2d04edb3
  1. 5

    An instance of a class that derives from Int or Str and adds nothing but roles holds the built-in's value while keeping its own type.

    class Int64 is Int does Marker { }: Int64.new(-42) == -42 and Int64.new(7).^name is Int64

  2. 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 passes2026-10-30 · c4df7b96
  1. 1

    An attributive parameter of BUILD that is not passed (submethod BUILD(:$!name) with no name) stores the parameter's default (Any, or the parameter's type) in the attribute, through the attribute's type check.

    has Str $.s with submethod BUILD(:$!s) and no s passed refuses the Any

  2. 2

    When BUILD has 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 passes2026-10-07 · 59a5f3e1 · #47
  1. 1

    An attribute declared has Int:D $.rows is required may be bound by the class's own submethod BUILD(:$!rows!): the :D check does not fail before BUILD has bound the argument.

build-initializes-required-attr-undefinedRaku++ passesRakudo passes2026-10-18 · e24ce9be
  1. 1

    is required asks 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.new lives

  2. 2

    An is required attribute 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 passes2026-09-10 · 42148dfa · #72 · #75
  1. 1

    A composed role's BUILD or TWEAK is flattened into the composing class and is discarded when the class declares its own; it does not get a separate turn during construction.

  2. 2

    Object construction runs the BUILD of every class in the MRO, least-derived first and each exactly once, and likewise each class's TWEAK. inferred

    with class auth-response is api-response, the parent's BUILD runs as well as the child's

    Also held by build-tweak-walk-the-mro.

builtin-type-find-method-answers-noRaku++ passesRakudo passes2026-10-31 · 3f0baa68 · #77
  1. 1

    .^find_method on 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 falsy

    Also held by find-method-from-table.

callable-context-callme-rawRaku++ passesRakudo passes2026-07-30 · 3f4c5290
  1. 2

    Calling a class by name with arguments invokes its CALL-ME method, in preference to the T(x) coercion reading, and can write back to its arguments.

    Trap(my $*OUT) runs Trap's CALL-ME

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

callables-method-rw-capture-requiredRaku++ passesRakudo passes2026-07-27 · 49bc60d6
  1. 2

    A statement-level my method m(Int:D: $x) {…} is a Method: &m.^name is Method, and calling it binds self and the invocant parameter.

  2. 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 passes2026-11-14 · 6de9d27b · rakudo#3802
  1. 2

    A computed method call ."…"() whose name is a private one is refused.

  2. 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 passes2026-09-15 · e8c5dd0d
  1. 1

    .can on 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 passes2026-08-04 · 53873511
  1. 1

    A built-in value answers .can truthfully 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 passes2026-09-16 · b22d82fc
  1. 1

    .can and .^can on a built-in type object find the methods that type has, including ones added by augment.

    Rat.can('Str') is not empty

categorical-method-nameRaku++ passesRakudo passes2026-09-11 · cc95e49f
  1. 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 it2026-07-30 · 215c3e29
  1. 5

    A user-defined is trait on a class dispatches to the user's trait_mod:<is> after the class exists, and an exception thrown by the trait body propagates.

  2. 6

    .^add_role adds a role to a class at runtime.

More from this test: Signatures & dispatch (1), Syntax & parsing (2).

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

    A .clone twiddle for an @ or % attribute assigns into the attribute's container rather than binding the raw value.

    .clone(a => (1,2)) leaves @!a an Array that .push can extend

  2. 3

    .clone twiddles set only attributes that have accessors; a private attribute is not reachable, even when it is is built.

  3. 4

    .clone takes named arguments only; a positional argument makes the call fail.

  4. 6

    callsame, nextsame and nextwith from a user method that overrides a built-in method redispatch to the built-in.

    a user method clone can callsame to the built-in clone

    Also held by redispatch-past-a-builtin-ancestor.

More from this test: Containers & assignment (1), Operators (1), Scoping & phasers (1).

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

    .self returns 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 passes2026-08-12 · 3e238862
  1. 3

    DateTime.^attributes and Date.^attributes list the type's attributes, from $!year to $!daycount and &!formatter.

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

cool-methods-not-on-plain-classRaku++ passesRakudo passes2026-10-08 · 0cc5b2bd · #135
  1. 1

    A class with nothing above it but user classes, Any and Mu has none of Cool's methods: .index, .substr, .uc, .chars, .sqrt, .lines, .IO and the rest throw X::Method::NotFound on an instance and on the type object.

    class A { }; my A $a; $a.index throws X::Method::NotFound

  2. 2

    On a plain class a FALLBACK, a .^add_fallback or a handles * delegation receives a call named like one of Cool's methods.

  3. 3

    On a plain class, split, fmt and chrs (multis Any declares), and .Int, .Numeric and .Real on an instance, throw X::Multi::NoMatch.

core-class-extended-in-placeRaku++ passesRakudo passes2026-10-27 · d5184116
  1. 2

    A class declared with the name of a core class it inherits from (class DateTime is DateTime is export in a module) takes as parent what the name meant before the declaration.

  2. 3

    Wrapping a core method through .^find_method('name').wrap(…) takes effect on later calls of that method.

    DateTime.^find_method('in-timezone').wrap(…)

  3. 4

    A method computed by .^add_fallback and a $d.&sub call receive the invocant's container, so an is rw parameter can replace $d, while a value invocant (my \d = …, 3.&m) does not match an is rw multi candidate.

More from this test: Dates & times (1).

core-type-roles-and-iterator-defaultsRaku++ passesRakudo passes2026-10-04 · 289f1691
  1. 1

    Hash is a Map, and Map, Hash, Range, Pair, Seq and the QuantHash family have fixed MROs in which Seq does Sequence.

  2. 2

    .^roles answers for core types, with :!transitive too.

  3. 3

    A role type object's REPR is Uninstantiable and a buffer's is VMArray.

  4. 5

    A role parameterized with a value shows the value's type in its name, while distinct values still make distinct parameterizations.

    R["x"].^name is R[Str], and R[5] is not R[6]

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

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

    A ::T type capture of a parameterized role resolves inside the role's method bodies, whether the role is composed or punned.

    R[Str].t.^name is Str when method t returns T

  2. 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 passes2026-07-23 · d7b9d40e
  1. 2

    self.bless(...) or $obj.new(...) called on an instance builds a fresh object.

  2. 6

    A sub declared 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 passes2026-10-10 · 29f5aa55
  1. 12

    Native integer types answer .^nativesize and .^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 passes2026-07-23 · 3c1b7a9e
  1. 4

    Assigning through the accessor of a public @. or %. attribute stores into the attribute even without is rw.

  2. 5

    only method is 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 passes2026-08-05 · b531a8bc
  1. 2

    .^methods includes 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 include public and r but not p

  2. 3

    A method's reflected .signature.params start with the invocant and end with the implicit *%_.

    E.^lookup('r').signature.params[*-1].name is %_

  3. 5

    Attribute.get_value on a type object throws.

    $attr.get_value(E) dies

  4. 6

    .^methods on a built-in type such as Any answers without dying.

    Any.^methods returns

  5. 7

    .^can on 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 passes2026-08-25 · 5faed01f · #28
  1. 8

    An attribute default written as a comma list, has @.a = 1,2,3, initializes the array with every element.

  2. 11

    A subscript whose base is a plain method call writes through to the object's field on assignment. inferred

  3. 13

    An attribute marked is required is satisfied when BUILD fills 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 passes2026-11-08 · 122eae41
  1. 1

    A core type whose new is 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. 2

    Str.new builds its string from the value named argument, also when called on an instance.

    "x".new(:value<a>) is "a"

default-object-rendererRaku++ passesRakudo passes2026-07-28 · c035f27d
  1. 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 and has %.h = (a=>1) a Hash

More from this test: Stringification (3).

definiteness-types-and-runtime-classesRaku++ passesRakudo passes2026-07-26 · d4912f15
  1. 2

    Metamodel::ClassHOW.new_type(:name, :ver, :auth) creates a class at runtime on which .^add_method and .new then work.

  2. 3

    The .HOW spellings 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 .isa and .gist are not forwarded to that argument.

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

dist-suite-quartetRaku++ passesRakudo passes2026-08-05 · 4e2c20cd
  1. 5

    $obj[$i] = v writes the real element when the object's method hands it back with return-rw @!arr[$i].

  2. 11

    Attribute defaults are evaluated in the declaring class's scope, so class-body constants are visible when .new is called from another compilation unit.

  3. 13

    A Code object with a role mixed in by but stays callable.

  4. 14

    A method wrapped through .^find_method(...).wrap runs the wrapper with (self, |args), and callsame reaches 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 passes2026-11-13 · 4f507a0f · rakudo#4463 · rakudo#5908 · rakudo#6113
  1. 1

    $.x in 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. 2

    Through a read-only accessor, $.n++, $.n += 1 and $.h<k> = 1 in a method change only a copy and leave the attribute as it was.

dot-equals-new-attr-defaultRaku++ passesRakudo passes2026-07-24 · 4cb81882
  1. 1

    has T $!x .= new initializes the attribute to T.new at construction.

    has Lock::Async $!lock .= new gives each object a lock instance

dot-method-call-and-formatterRaku++ passesRakudo passes2026-08-04 · e376ad98
  1. 1

    $.name(ARGS) is self.name(ARGS): a method call that receives those arguments.

    method viaDot($n) { $.greet($n) } returns what self.greet($n) returns

More from this test: Dates & times (2), Signatures & dispatch (1).

ecosweep-2026-09Raku++ passesRakudo passes2026-09-05 · ebe0953e
  1. 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 passes2026-08-25 · 6879a71b
  1. 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

  2. 16

    An enum's .HOW is a Metamodel::EnumHOW and its .WHO holds 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 passes2026-08-24 · 298866e3
  1. 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.^ver is v7.7

More from this test: Hashes & sets (1), Native types & NativeCall (3).

enum-does-role-and-archetypesRaku++ passesRakudo passes2026-11-13 · 73357985 · rakudo#3376
  1. 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 passes2026-11-13 · 2eafbb23 · rakudo#2165
  1. 1

    An enum's metaobject supports E.HOW.add_enum_value(E, key => value).

  2. 2

    .pick of an enum whose values are not Ints answers members that keep their own .value.

    Chain.pick.value of enum Chain (A => "T", …) is not 0

  3. 3

    .^enum_values of an enum is a Hash.

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

    .^mixin called on an object mixes the role into that object. inferred

  2. 7

    .^add_method works on a built-in type.

More from this test: Containers & assignment (1), Exceptions & control flow (4).

exe-accessor-assignRaku++ passesRakudo passes2026-11-11 · 4d6ad00d
  1. 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. inferred

    after assigning pairs through a % attribute's accessor, $g.map<a> reads the value

More from this test: Containers & assignment (1).

exe-attribute-traitsRaku++ passesRakudo passes2026-11-11 · b991c157
  1. 3

    A class whose parent is a core value type, such as is Int, can be constructed with a positional value. inferred

    a class declared is Int accepts .new(7)

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

exe-mechanical-nativeRaku++ passesRakudo passes2026-11-20 · ef8f4453
  1. 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 passes2026-10-18 · 87624125
  1. 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 passes2026-11-11 · 539110b8
  1. 2

    In a role's method, $?CLASS is the class that composes the role.

    $?CLASS.^name in 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 passes2026-11-11 · ca60fcc7 · #78
  1. 1

    A package declarator installed through EXPORTHOW::DECLARE builds its types with the given metaclass, whose add_method receives, and may wrap, every method.

    with a monitor whose 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 passes2026-10-31 · ad7f05dc · #77
  1. 1

    .can and .^can on 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 passes2026-11-08 · 34e48087
  1. 1

    A class's FALLBACK does not take a method Any has: Any's method is found first.

    W.new.first is the object and W.new.elems is 1

  2. 2

    .throw, .rethrow, .resume and .backtrace on an object that is no Exception go to its class's FALLBACK.

    W.new.throw calls FALLBACK instead of throwing the object

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

    A class's method FALLBACK is 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 passes2026-11-08 · cd191fb1
  1. 2

    A role answers .can from its own methods and Any's.

    Cool.can('chars') is not empty and Numeric.can('abs') is empty

generic-role-bodiesRaku++ passesRakudo does not pass2026-09-28 · b47d945a
  1. 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 .= new in R[Int] is 0 and in R[Str] is ""

  2. 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] in R[Int] is R::G::A[Int]

  3. 3

    T:D, T:U, T() and T:D() written in a parametric role resolve to the type the parameter is bound to, not the name as written.

  4. 6

    has @.a is A, with class A is Array[Int], keeps A's element type.

  5. 7

    A parametric role's body runs for every way of parameterizing it: also does R[…], is R[…], R.^parameterize(…), and a constrained capture role R[Numeric ::T].

More from this test: Scoping & phasers (1), Syntax & parsing (2).

get-attribute-for-usageRaku++ passesRakudo passes2026-09-15 · e1b41314
  1. 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 passes2026-08-30 · 5e23726e
  1. 3

    Mixing in a role with a named argument, does R(:a(9)), presets the role's attribute a, as the positional form does R(7) does.

    after does R(:a(9)) the object's .a is 9 and its type name is C+{R}

  2. 4

    A routine with a role mixed in is no longer exactly a Sub: its .WHAT differs from Sub and its type name carries the role's name.

    &marked.WHAT !=== Sub is True

More from this test: Containers & assignment (1), Lists & laziness (1), Signatures & dispatch (2), Stringification (1), Types & coercion (1), divergences (1).

grammar-ancestryRaku++ passesRakudo passes2026-08-12 · 3e238862
  1. 1

    A grammar declaration derives from Grammar, whose own chain is Match, Capture, Cool.

    grammar G {}; G ~~ Grammar is True

  2. 2

    A class inheriting from a built-in type conforms to that type's whole ancestry.

    class F is Str {}; F ~~ Cool is True

  3. 3

    A Match value is a Capture and is Cool.

grammar-how-is-grammarhowRaku++ passesRakudo passes2026-10-29 · 78c4f478 · #214
  1. 1

    A grammar's HOW is a Metamodel::GrammarHOW, which is a Metamodel::ClassHOW.

    G.HOW ~~ Metamodel::GrammarHOW is True

handles-assign-keyRaku++ passesRakudo passes2026-08-04 · e8a91435
  1. 1

    $obj{k} = v calls an ASSIGN-KEY that the object gets through handles delegation, keeping the object intact.

    with has %!s handles <AT-KEY EXISTS-KEY ASSIGN-KEY>, %!C{'k'} = 42 leaves $t.C.^name as TC and $t.C{'k'} as 42

handles-delegation-satisfies-and-dispatchesRaku++ passesRakudo passes2026-11-09 · 88f81c1f
  1. 1

    A handles delegation 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 declares method page { ... }

  2. 2

    A handles delegation inherited from a second parent class or brought by a role in a later does clause is dispatched, whether it is declared on a method or on an attribute.

    with class D is B is A, a method delegated by handles in A is callable on a D

has-list-item-traitsRaku++ passesRakudo passes2026-11-13 · f102e0f5 · rakudo#2078
  1. 1

    An attribute in a parenthesised has (…) list takes its own traits before its default.

    has ($.z is rw = 42) declares a read-write $.z with the default 42

hash-into-array-attributeRaku++ passesRakudo passes2026-10-15 · a9ab7ad8
  1. 1

    A Hash given to an @ attribute at construction, as an attribute default or in .clone, is spread into its pairs, as my @a = %h does; a Map, a Set and a Bag likewise.

    class A { has @.data }; A.new(data => {a => 1}).data is [a => 1]

  2. 2

    Only an itemized hash ($%h, %h.item, a $h holding one) given to an @ attribute stays one element.

how-compose-sees-declared-methodsRaku++ passesRakudo passes2026-10-28 · 8c871a25
  1. 1

    A public attribute's accessor is made by the base metaclass compose, and only when no method of that name exists, so a custom compose sees only the declared methods in .^method_table before its callsame.

    before callsame, $.bar has put no bar in .^method_table

how-declaration-hooksRaku++ passesRakudo passes2026-09-15 · d4a274b2 · #86
  1. 1

    A module-supplied metaclass drives a class declaration piece by piece: its new_type, add_attribute per attribute, add_method per method and compose are each called.

  2. 2

    A POPULATE method that a metaclass adds to a class runs when an instance is constructed.

how-legacy-exporthowRaku++ passesRakudo passes2026-09-28 · 2cc896bd
  1. 1

    EXPORTHOW.WHO.<class> = TheHOW in a module replaces the HOW of every class declared after the use of that module.

  2. 2

    A user trait_mod:<is> candidate on a class that is narrower than inheritance decides what is Parent means, so the named type is handed to the trait instead of being inherited from.

http-useragent-clusterRaku++ passesRakudo passes2026-08-05 · 271e54e8
  1. 7

    Assigning with $.attr = v enforces the attribute's declared type, subsets included, and the error names the qualified type.

    has RequestMethod $.m is rw rejects 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 passes2026-09-15 · e1b41314
  1. 1

    is implementation-detail on a class is a trait, not a superclass.

indirect-method-call-nativeRaku++ passesRakudo passes2026-08-31 · f11af0e8 · #45
  1. 2

    $obj.$callable calls the Callable with the invocant as its first argument, and when the variable holds a type object it is the coercion to that type.

    $v.$ct with my $ct = Rat is Rat($v)

  2. 3

    A public call by name, $obj."foo"(), never reaches a private method !foo; it throws X::Method::NotFound.

interp-meta-mixin-block-sig-allomorphRaku++ passesRakudo passes2026-07-27 · e143336a
  1. 2

    but does not mix in a plain class: 1 but B with a non-role class B is rejected, while 1 but Numeric is 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 pass2026-07-30 · cb88278b
  1. 2

    is built(:bind) on a private attribute lets .new set it by name.

  2. 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 passes2026-09-11 · 6d82fac4
  1. 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 passes2026-07-27 · 20fa90d5
  1. 4

    .^set_ver, .^set_auth and .^set_api set what .^ver, .^auth and .^api report, and a v0.0.1 literal given to .^set_ver reads back as v0.0.1.

More from this test: I/O & processes (4), Types & coercion (1).

is-deeply-strict-and-anton-batchRaku++ passesRakudo passes2026-08-28 · 2421c094
  1. 8

    .^find_method finds an attribute accessor, and answers nothing for a method a built-in type does not have.

    Int.^find_method('type') is undefined

  2. 10

    Passing Nil for an attribute to .new resets it to its default: Any for 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.raku is Int

  3. 13

    C but R on 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).mark is marked and (Plain but Marked).DEFINITE is 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 passes2026-09-28 · c2161341 · #110
  1. 1

    A value given by name to new, bless or .clone is assigned to its attribute, so it must pass the type check that $!name = value would.

    has Str $.s refuses Any, has A $.a refuses an unrelated object, has int $.i refuses a Str

  2. 3

    A Nil given for an attribute in the constructor resets the attribute to its default (its is default, when it has one) instead of being stored.

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

issue-172-stub-completion-sees-types-betweenRaku++ passesRakudo passes2026-10-14 · 87367bca · #172
  1. 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. 2

    A class stubbed with my class A {...} is usable between the stub and its completion further down.

issue-182-create-on-instanceRaku++ passesRakudo passes2026-10-18 · 97f48de2 · #182
  1. 1

    .CREATE on an instance allocates another object of the invocant's type, so self.CREATE works in a method called on an instance, for a user class and a built-in alike.

  2. 2

    .CREATE on a built-in type object makes an instance of that type.

    Mu.CREATE.WHAT === Mu; Int.CREATE is an Int and Hash.CREATE a Hash

  3. 3

    A class's own method CREATE is called when .CREATE is invoked on its type object.

    P.CREATE calls P's method CREATE

issue-221-array-list-which-identityRaku++ passesRakudo passes2026-11-07 · 266d37c6 · #221
  1. 2

    Two temporary reference objects have distinct .WHICH values, whether Lists, Hashes, Bufs, Instants or instances of a class.

    (1,2).WHICH eq ('1','2').WHICH is False, and so is Foo.new.WHICH eq Foo.new.WHICH

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

issue-225-fallback-gets-nameRaku++ passesRakudo passes2026-11-07 · e7bbb97c · #225
  1. 1

    A class's FALLBACK, a handles * delegation or a .^add_fallback receives .name like any other method the class lacks, since name is 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 => …).name reaches FALLBACK

issue-43-private-method-quoted-nameRaku++ passesRakudo does not pass2026-08-30 · 71abc700 · #43
  1. 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 passes2026-08-26 · 27b07a35 · #34
  1. 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>), .terminal calls .t on the handle

  2. 2

    A handles delegation 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 passes2026-09-03 · 2461384d · #63
  1. 3

    .clone is shallow: the original and the clone share the one Array an @.data attribute holds, and self.data = […] list-assigns into that shared Array.

More from this test: Containers & assignment (2).

lizmat-containers-and-dispatchRaku++ passesRakudo passes2026-09-13 · 3a8f2148
  1. 2

    A user class may have an attribute named $!reified, and nqp::bindattr($obj, T, '$!reified', $buf) sets that attribute without changing what the object is.

  2. 4

    A Code object answers .file and .line with where it was declared.

More from this test: Hashes & sets (1), Signatures & dispatch (1), Strings & Unicode (1), Syntax & parsing (1).

math-sparsematrix-installRaku++ passesRakudo passes2026-08-31 · b165e3b8
  1. 5

    Assigning through an is rw accessor delegated with handles writes the delegate's attribute.

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

metamodel-mixin-and-trait-importsRaku++ passesRakudo passes2026-09-15 · c7787832 · #77
  1. 1

    $obj does Role(arg) presets the role's single public attribute, even when the role also has private attributes.

  2. 2

    A role mixed into an Attribute meta-object can read and write its own private attributes from its methods.

  3. 3

    A role's private attribute does not shadow a role method of the same name.

    has $!column beside method column

  4. 6

    .^add_multi_method adds a multi candidate to a class.

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

method-also-role-composition-2026-09-02Raku++ passesRakudo passes2026-09-02 · 5639cae0
  1. 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 passes2026-10-04 · 1ae46f02
  1. 4

    @.m(…) and @.m: … are calls on self in list context.

  2. 5

    An anonymous submethod (…) {…} is a term, and a Submethod's type is Submethod, a Routine that is not a Method.

  3. 6

    returns ::?CLASS on a method resolves to the enclosing class.

  4. 7

    .$var where $var holds a Str invokes the string as code and so fails; it is not a method call by name.

  5. 8

    .WHERE and .VAR on a WhateverCode answer about the WhateverCode itself.

  6. 9

    The default constructor refuses a positional Pair.

  7. 11

    Int, Num and Hash answer .^method_table, and True.enums answers the Bool enumeration.

  8. 13

    Cool methods called on an undefined Any are X::Method::NotFound, and so are numeric methods on a Block.

  9. 14

    A my class declared inside a method is named under the method's class.

    my class X in a method of Q is Q::X

More from this test: Containers & assignment (1), Numerics (1), Operators (1), Strings & Unicode (1), Syntax & parsing (2).

method-introspection-and-indirect-callRaku++ passesRakudo passes2026-08-27 · fac8387c
  1. 1

    A method's .signature.count and .arity count the invocant.

    method file(Bool $v = True) has count 2 and arity 1

  2. 2

    The signature of a multi method group, as .^lookup returns it, is its proto's.

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

method-trait-mixinRaku++ passesRakudo passes2026-08-26 · e25ccecb · #34
  1. 1

    $obj does R($v) instantiates a role that has exactly one attribute, presetting that attribute from the positional.

  2. 2

    does on 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(…) smartmatches Constraint

  3. 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. 4

    trait_mod:<of>($method, T) is callable as a routine.

  5. 5

    A trait on a proto method applies to the dispatcher that .^lookup returns, and that dispatcher is a Method.

mixed-in-attribute-meta-accessRaku++ passesRakudo passes2026-11-13 · 24256603
  1. 1

    An Attribute meta-object with a role mixed in answers .^get_attribute_for_usage for the role's attributes, and their .get_value reads and writes them.

    self.^get_attribute_for_usage('$!' ~ $name).get_value(self) = $value works in a trait on an Attribute

mixin-keeps-parameterized-ofRaku++ passesRakudo passes2026-09-14 · a81e2c44
  1. 1

    A type mixin on a parameterized container type keeps the element type.

    (Array[Foo] but R).of is Foo

module-compat-clusterRaku++ passesRakudo passes2026-08-09 · 74aac52a
  1. 1

    A bare does R on a parameterized role binds the role parameters' defaults.

  2. 3

    .HOW.archetypes on a class answers .nominal True and .parametric False.

    ?C3.HOW.archetypes.nominal is True

  3. 4

    An @-sigiled typed attribute's .type is Positional[T], and .type.of is the element type.

    C4.^attributes[0].type.^name is Positional[L4]

  4. 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 .^attributes returns.

    after is json-name(...), the attribute smartmatches JSON::Name::NamedAttribute and answers .json-name

    Also 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 passes2026-07-30 · 8de6c3a0
  1. 7

    Assigning a list through the accessor of an @ attribute list-assigns its elements rather than storing one itemized array.

    $obj.nodes = @list stores the elements

  2. 13

    A user is trait on a method dispatches to trait_mod:<is> with its angle word-list argument and with $*PACKAGE bound.

  3. 14

    A T.HOW does R mixin persists, and a mixed-in compose method runs at class composition.

More from this test: Numerics (1), Regexes & grammars (7), Stringification (2), Strings & Unicode (1).

module-supplied-package-declaratorRaku++ passesRakudo passes2026-09-11 · 7f09744b
  1. 1

    A module can add a package declarator through EXPORTHOW::DECLARE: once it maps a word to a metaclass, word Foo { … } and unit word Foo; declare a class whose .HOW is that metaclass.

    my package EXPORTHOW { package DECLARE { constant model = MetamodelX::Red::Model } } enables model Foo { … }

  2. 2

    For a type declared with a custom HOW, every .^method call reaches that HOW, the MOP operations of its parent Metamodel::ClassHOW stay available, and its compose runs with its errors propagating.

mop-metamodelRaku++ passesRakudo does not pass2026-07-24 · ea1a472a
  1. 1

    An Attribute meta-object reads and writes its slot on an instance with .get_value and .set_value.

  2. 2

    .^ver, .^auth and .^api report a type's declared version, authority and API, and .^attribute_table gives its attributes by name. inferred

  3. 3

    .^compose returns the type, and .^set_name renames it. inferred

  4. 4

    Attribute.new together with .^add_attribute adds an attribute to a class being built at runtime.

  5. 5

    .^declares_method is true only for a method declared in the class itself, not an inherited one, and .^find_method_qualified looks a method up in a named class. inferred

mro-puns-and-hiddenRaku++ passesRakudo passes2026-09-27 · 0d048722
  1. 1

    .^mro shows a role a class inherits with is R or hides R as its pun, while a role a class does is composed and is never in the MRO.

    for class C3 is R3a, C3.^mro includes R3a

  2. 2

    .^mro_unhidden leaves out the classes that are hidden.

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

    .does is true for a role in a built-in type's ancestry, .isa is strict class inheritance and false for a role, and smartmatch agrees with .does for instances and types.

    Date.does(Dateish) is True and Date.isa(Dateish) is False

  2. 2

    Mu.new and Any.new give a defined, truthy instance of the root type; Mu.new gists as Mu.new.

  3. 4

    $obj.Capture gives 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 passes2026-10-18 · 7d824d2b
  1. 3

    A multi method written 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 it2026-08-15 · 42283242
  1. 3

    .does is True for the buffer roles a buffer does, while .isa is 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 passes2026-09-12 · cb851ea9
  1. 3

    but applied 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).defined is False

More from this test: Exceptions & control flow (1), Everything else (1), Signatures & dispatch (2), Stringification (2).

new-array-attr-from-a-returned-seqRaku++ passesRakudo passes2026-11-02 · 42618157
  1. 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()) with f returning a .map fills has @.a

new-strays-and-virtual-accessorRaku++ passesRakudo passes2026-07-22 · 9c36944a
  1. 1

    The default .new binds named arguments to declared public attributes only; a named argument matching no attribute stores nothing.

  2. 2

    $.name in a class with no such attribute or method dies with X::Method::NotFound.

    a class with has $.naam dies at a $.name call

non-ascii-type-names-in-parser-guessesRaku++ passesRakudo passes2026-10-23 · 9d48b3b5
  1. 4

    handles takes a class named in any script and delegates its methods.

    has $.b handles Éx

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

package-gapsRaku++ passesRakudo passes2026-11-08 · 85a90672
  1. 3

    .new on a package dies "You cannot create an instance of this type (P)".

    P.new for package P {}

More from this test: Compile-time errors (1), Modules (1).

package-relative-namesRaku++ passesRakudo passes2026-07-23 · 0e4912e1
  1. 2

    A class declared inside a class body is named Outer::Inner, and its short name still resolves inside the outer body, including in my Inner $x .= new.

  2. 4

    .can reports built-in methods such as new and gist, and parse/subparse on a grammar.

More from this test: Modules (2), Operators (1), Regexes & grammars (1).

package-symbols-and-package-howRaku++ passesRakudo passes2026-07-29 · 0d9102b0
  1. 2

    Metamodel::PackageHOW, Metamodel::ModuleHOW and Metamodel::GrammarHOW provide .new_type, as ClassHOW and the role HOWs do.

More from this test: Modules (1).

parameterized-role-value-paramsRaku++ passesRakudo passes2026-07-24 · ccf3d129
  1. 1

    A parameterized role with value parameters (role R[$x], role R[%h], role R[Bool :$opt]) binds the arguments of does R[args] and makes them visible in its methods and submethods.

path-methods-on-any-valueRaku++ passesRakudo passes2026-11-25 · 43558c4f · #275
  1. 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 passes2026-09-14 · a3586267
  1. 14

    A routine may carry a handles trait and delegate: method m handles <a b>.

  2. 21

    A role mixed in at runtime gives its typed attributes their type object as the initial value.

  3. 22

    .?meth answers Nil for a missing method even when the miss is reported against an ancestor type.

  4. 23

    A role composes the roles of the roles it composes.

  5. 24

    A plain sub installed with .^add_method receives the invocant as its first positional and keeps the self of the closure it was made in.

  6. 26

    .^is_pun says whether a class is a role's pun and .^pun_source names the role; an ordinary class is not a pun.

  7. 28

    .^mixin reblesses the object itself, so the original object then smartmatches the mixed-in role.

  8. 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

  9. 32

    A class derived from a built-in type gives its typed attributes their type object as the default. inferred

  10. 36

    A user class built on Attribute or Parameter is backed by a working meta-object. inferred

  11. 38

    .new, .bless and .CREATE called on an instance construct another object of its type.

  12. 46

    A role mixed in at runtime also composes the roles that role composes.

  13. 57

    nextwith from the .new of a class derived from a built-in type answers an instance of that class, not of the built-in.

  14. 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 passes2026-11-09 · a343a825
  1. 1

    .push, .append, .unshift and .prepend on 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. 2

    .splice on an instance of a plain class fails with an error naming a proto that has no candidates.

  3. 3

    .sum on an instance of a plain class asks for the object's .Numeric and fails for want of one.

  4. 4

    Any's .push, .append, .unshift, .prepend, .splice and .sum are found on an object before its class's FALLBACK method is tried. inferred

private-attr-not-inheritedRaku++ passesRakudo passes2026-09-10 · 44aebce0
  1. 1

    A private attribute is per-class and never inherited: $!x in a child class naming a parent's attribute is a compile-time X::Attribute::Undeclared.

  2. 2

    A composed role's attributes belong to the composing class and are reachable there through $!name.

private-call-and-import-shadowingRaku++ passesRakudo passes2026-08-27 · fac8387c
  1. 1

    A private method call is allowed anywhere lexically inside the declaring class, a routine with no self included, 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 passes2026-11-13 · 91033936 · rakudo#2663
  1. 1

    self!name reaches 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's greet calls Puppy's own private method

private-method-result-writableRaku++ passesRakudo passes2026-10-02 · 99f09017 · #104
  1. 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, as self.rec($k)<n>++ does

private-public-method-same-nameRaku++ passesRakudo passes2026-07-24 · eeafa112
  1. 1

    A private method !name and a public method name are distinct and coexist: self.name calls the public one and self!name the private one.

proto-method-packageRaku++ passesRakudo passes2026-09-16 · b22d82fc
  1. 1

    A proto method or a multi-method group answers its declaring class from .package, the same as an ordinary method.

qualified-dispatch-and-nil-smartmatchRaku++ passesRakudo passes2026-07-24 · 1dff3a45
  1. 1

    $obj.Class::method calls Class's method, reaching past the invocant's own override.

    self.Parent::meth inside an override calls the parent's method, not the override again

More from this test: Operators (1).

quantifier-modifiers-and-anon-methodsRaku++ passesRakudo passes2026-07-27 · 40bb85d6
  1. 2

    method {…} as a term builds a Method that takes its invocant as the first argument and binds self.

    "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 passes2026-10-10 · e1663c0c
  1. 3

    $x but R(value) and $x but R<value> set the role's attribute before the role's TWEAK runs.

More from this test: Concurrency (1), Hashes & sets (1), Signatures & dispatch (1), Types & coercion (2).

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

    A typed attribute defaulted to Nil holds its type object.

    has IO::Handle $.x = Nil holds IO::Handle

  2. 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 passes2026-10-05 · be813251
  1. 10

    is Array on 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 passes2026-10-05 · c5326843
  1. 1

    A role's attribute composed into a class has that class as its .package.

  2. 2

    A qualified method call naming a type the invocant does not inherit from is X::Method::InvalidQualifier.

    self.No::Such::foo is X::Method::InvalidQualifier

  3. 9

    $obj.attr = Nil resets the attribute to an is 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 passes2026-10-05 · 98ddcee4
  1. 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 passes2026-10-03 · 99895bb5
  1. 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 passes2026-10-09 · 8902cac9
  1. 7

    .^nominalize unwraps 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 passes2026-09-11 · 7f09744b
  1. 2

    A class inheriting from a built-in class lists that ancestor once in its .^mro.

    class A is Exception has the MRO A, Exception, Any, Mu

refused-parent-leaves-no-typeRaku++ passesRakudo passes2026-11-09 · cd1e7aa9
  1. 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 passes2026-09-28 · bda6f720
  1. 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.

  2. 13

    role R2[::T] does R1[::T] makes R2[Num] do R1[Num], in dispatch and in .^roles.

  3. 14

    self.R::m names the parameterization of R that the calling code's type composed.

  4. 15

    A role group spans compilation units, each candidate keeps its own language revision, and R.new / R[Str] pun the candidate that fits.

  5. 16

    A plain method call on a role group is the default candidate's method.

  6. 17

    A 6.e role's BUILD/TWEAK run 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 passes2026-09-28 · 6e9ef4cc
  1. 12

    List and Any each declare an elems, so .+elems on 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 passes2026-09-28 · 2cc896bd
  1. 7

    When no candidate of a user multi method new matches, the call falls to Mu.new, which refuses positional arguments. inferred

  2. 10

    A method of a subclass run on an instance of its parent class dies when it reads a $!x attribute that object does not have. inferred

  3. 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 pass2026-09-28 · 2cc896bd
  1. 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 --> is X::Redeclaration. inferred

    my class HM1 { has Int method foo() { 42 } }; HM1.foo is 42

  2. 8

    has @.a of int keeps 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 it2026-09-28 · 2cc896bd
  1. 8

    A Failure returned from BUILD is what .new answers. inferred

  2. 15

    The @ attribute of a role mixed into an object starts as an empty Array. inferred

  3. 24

    has $.x does R mixes the role into the attribute's initial value. inferred

  4. 29

    A role composing another role that declares the same attribute is refused when it is punned. inferred

  5. 32

    Multi methods with different constraints composed from two roles do not conflict. inferred

  6. 42

    A user trait on a variable receives the Variable object, named with its sigil, and what the trait mixes into .var is on the variable afterwards. inferred

  7. 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

  8. 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 passes2026-09-15 · 6b733a6f
  1. 1

    ::?CLASS in a role body, outside its methods, is the class the role is being composed into, not Mu.

  2. 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 passes2026-10-18 · c832a1a7
  1. 1

    A role's is required attribute is checked after the BUILD the composing class took from the role has run, so the role's submethod 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. 2

    The is required attributes of the roles a role does (role R does Q) are checked at construction.

role-callsame-skips-composed-roleRaku++ passesRakudo passes2026-11-08 · d6c9e30c
  1. 1

    callsame from 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, callsame in S's method does not call B's

role-candidate-required-named-keyRaku++ passesRakudo passes2026-11-08 · 370e0b4d
  1. 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's m($a, :$cast!), C.new.m(1, :cast) answers the role's

role-clash-through-roleRaku++ passesRakudo passes2026-11-09 · 57dad570
  1. 1

    Composing a class is refused when a multi method and an only method of 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. 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 passes2026-09-27 · 0d048722
  1. 1

    A class that does a parametric role gets the role's methods with the type parameters bound to that parameterization, so a multi method foo(T $t) composed from R[Int] matches an Int argument.

  2. 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 passes2026-11-08 · 846ae003
  1. 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 passes2026-11-13 · 112a0cdb · rakudo#4361
  1. 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 passes2026-11-09 · c0aa3e0e
  1. 1

    A class's does W['B'] composes the candidate of role group W whose signature the arguments fit, so a literal role parameter matches only its own value.

    with role W['A'] beside role W['B'], does W['B'] composes W['B'] and its methods

  2. 2

    Among role-group candidates that fit, the choice follows multi dispatch over their signatures: the narrowest types, then a literal, where or captured type that accepted, in declaration order, then the candidate taking exactly that many arguments.

  3. 3

    An untyped role parameter is typed Mu.

  4. 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 only role W['A'] and role W['B'] declared is refused

role-group-candidate-does-bare-roleRaku++ passesRakudo passes2026-11-09 · f11a9f04
  1. 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. 2

    A run-time $obj does W['X'], where role W['X'] does W, gives the object the bare W's methods too.

  3. 3

    A role that does itself is refused.

role-how-specialize-wraps-specialize-withRaku++ passesRakudo passes2026-11-09 · 6004f84a
  1. 1

    When a class composes a role, the role metaobject's specialize is called and specialize_with runs inside it, so a dynamic variable declared by an overridden specialize is visible to an overridden specialize_with.

  2. 2

    A role metaobject that overrides only specialize_with has it called for each class that composes the role.

role-in-role-multi-candidates-joinRaku++ passesRakudo passes2026-10-31 · 1d5e98c0 · #77
  1. 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 passes2026-10-30 · 0b29ef00
  1. 1

    A role's own metaobject ($*PACKAGE.HOW in 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. 2

    A trait on a role declaration receives the role group, whose .^candidates[0].HOW is the role's own metaobject, not the group's.

    role Foo is json-rpc-actor

  3. 3

    When a class composes a role, the role's metaobject's specialize_with is called and the concrete role it makes is filled through add_method.

  4. 4

    nqp::getattr($concrete-how, Metamodel::ConcreteRoleHOW, '@!roles') reads a concrete role's roles. inferred

role-multi-siblings-differing-by-namedRaku++ passesRakudo passes2026-10-31 · 4df715fc · #77
  1. 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!) and multi method new($left, $right): Red::AST::Concat.new($left, $right) finds the plain one

role-parameter-reaches-body-subsRaku++ passesRakudo passes2026-09-15 · 059e963a
  1. 1

    A role's value parameter is visible inside a sub declared 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 passes2026-09-13 · f3aa6cb1
  1. 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. 2

    A twigil-less attribute, has @items, can be read as well as assigned through its bare name @items inside the class.

  3. 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 passes2026-09-15 · 059e963a
  1. 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 $prefix to "BIT_"

  2. 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 passes2026-08-14 · e3994d54
  1. 2

    A nested subscript assignment $obj<a><b> = v calls the inner object's ASSIGN-KEY.

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

role-stub-first-missingRaku++ passesRakudo passes2026-10-09 · fadb97aa · #35
  1. 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-does first.

roles-order-and-value-argumentsRaku++ passesRakudo passes2026-11-09 · 0d6168fb
  1. 1

    .^roles lists a class's own roles last-declared first, each followed by the roles it does in the order its does clauses are written.

    .^roles of a class declared does R2 does R5 is R5 R2 R1

  2. 2

    In .^roles, a role parameterized by a value is named by the value's type.

    does R2[1] is listed as R2[Int]

  3. 3

    .^roles on a parameterized role's type object lists the roles that role does and does not include the role itself.

    R2[1].^roles is empty

routine-mixin-attribute-and-direct-dispatcherRaku++ passesRakudo passes2026-10-30 · 9b3fbb8a
  1. 1

    A role mixed into a routine with does keeps the attributes its own methods write.

    after meth does R; meth.set-json-rpc-name($name) the role's $!attr reads back the name

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

routine-scoped-match-and-when-lastRaku++ passesRakudo passes2026-08-05 · 73e24219
  1. 4

    .^lookup answers Mu for 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 passes2026-09-11 · 7f09744b
  1. 1

    A class-level is <name> trait whose name is lowercase and not a known type is dispatched to a user trait_mod:<is>, not read as inheritance.

    unit model Foo is table<sqlite_master> applies a user table trait

  2. 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 passes2026-07-27 · ebbe10f3
  1. 12

    .CREATE allocates an object without running BUILD or TWEAK.

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 passes2026-10-29 · 2b82edd7 · #60
  1. 1

    Every parent of a class seeds its attribute defaults at construction, not only the first one.

    class X is A is B keeps B's defaults, and class F does R is A keeps A's

  2. 2

    An is required attribute of a second parent, or of a parent beside a role, is enforced at construction.

sigilled-compile-time-classRaku++ passesRakudo passes2026-09-15 · dcb882c0
  1. 1

    $?CLASS, the sigilled spelling of ::?CLASS, resolves to the enclosing class, including in a unit class body.

    $?CLASS.^name in a class body is the class's name, not Any

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

    .clone does 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 passes2026-07-23 · 41485d25
  1. 1

    A statement whose value is discarded calls the result object's user-defined sink method, and every top-level statement is in sink context.

    a bare statement HTTP::Status.new: 404, 'Not Found' runs that class's method sink

statistics-distributions-clusterRaku++ passesRakudo passes2026-08-21 · 41c4e624
  1. 1

    .^method_names lists 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 passes2026-11-13 · 2987aab9 · rakudo#3976
  1. 1

    A submethod, a multi submethod too, is in .^submethod_table and not in .^method_table.

    class Foo { multi submethod FOO { … } } has FOO in .^submethod_table only

  2. 2

    .^methods and .^method_names list submethods.

subset-metamodel-for-sub-modelsRaku++ passesRakudo passes2026-10-31 · 0abc0b39 · #77
  1. 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. 2

    A subset answers .^refinee with its base type and .^refinement with its constraint.

  3. 3

    Each subset has a .HOW object of its own, so a role can be mixed into it with does.

    $s.HOW does Role does not die

  4. 4

    A user-defined is trait on a subset declaration is applied to the subset.

    subset Administrator is sub-model of User where *.role eq "admin"

subset-named-for-packageRaku++ passesRakudo passes2026-11-08 · 5f78f1f3
  1. 1

    A subset declared in a package is named for it, my or not: its .^name and .raku are the long name, its gist and .^shortname the short one.

    class K { my subset S of Int } has S.^name K::S

subset-unknown-trait-and-new-type-nameRaku++ passesRakudo passes2026-11-08 · f59ff84c
  1. 3

    A subset made at run time by Metamodel::SubsetHOW.new_type under a name already taken answers the name it was given.

    its name is User, not User+1

More from this test: Compile-time errors (1), divergences (1).

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

    Int:D.HOW is a DefiniteHOW.

  2. 13

    .^can('elems') finds two candidates on Seq, Range, Map and Hash.

More 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 pass2026-10-11 · fc6abf32
  1. 13

    A built-in value does not do a user-declared role that shadows a core role's name.

  2. 17

    A class's own BUILD that ignores the argument for an is required attribute 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 pass2026-09-03 · 8ed8618a
  1. 3

    .^add_parent on a type made with Metamodel::ClassHOW.new_type puts the parent in the type's .^mro once 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 pass2026-09-02 · 7af75847
  1. 7

    nqp::create(self) in a user class makes an instance of that class, and nqp::getattr($pair, Pair, '$!key') and '$!value' read a Pair's parts.

    nqp::getattr(42 => "foo", Pair, '$!key') is 42

  2. 13

    Method.package is the class or role that declares the method.

    Pkg.^lookup('m').package.^name is Pkg

  3. 14

    A role's .HOW is not a Metamodel::ClassHOW, while a class's is.

  4. 17

    $.name inside a method called on a type object is still a method call on self.

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 passes2026-08-31 · 68e53568 · #53
  1. 1

    my $.x in 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 passes2026-11-08 · 53837aa5
  1. 3

    A role's is takes a class as its parent, the role's own type capture, or a trait a trait_mod:<is> candidate takes.

    role RC[::T] is T

More from this test: Compile-time errors (2).

user-class-named-ratRaku++ passesRakudo passes2026-11-12 · 7fc5b00b · rakudo#5537
  1. 1

    A user class may be named Rat, and .new on it makes an ordinary object of that class.

    class Rat is Quadruped { has $.head = 1 }; Rat.new makes an ordinary object

user-method-vs-mop-noopRaku++ passesRakudo passes2026-07-24 · 2ff0ed06
  1. 1

    A user-defined method named like a metamodel method (compose, publish_method_cache, set_rw) is what .compose calls; only .^compose reaches the metamodel.

xml-triad-backref-indirect-coerceRaku++ passesRakudo passes2026-07-23 · 903b4a38
  1. 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 passes2026-07-24 · 75f92c65
  1. 2

    $obj<key> and $obj[i] on an object call its AT-KEY/AT-POS (including ones delegated by handles), and :exists/:delete call EXISTS-KEY/DELETE-KEY.

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