Documentation for trait is default (Attribute)

Documentation for trait is default (Attribute), assembled from the following types:

class Attribute

From Attribute

(Attribute) trait is default (Attribute)

An attribute that is assigned Nil will revert to its default value set with the trait is default.

class C {
    has $.a is default(42is rw = 666
}
my $c = C.new;
say $c;
$c.a = Nil;
say $c;
# OUTPUT: «C.new(a => 666)␤C.new(a => 42)␤»