Quick actions

cmd+k|ctrl+k

Navigation

Languages

Untitled

Snippet info

Language

Raku

Visibility

unlisted

Author

legacy-anonymous

Created

2024-06-28T15:55:40.93802Z

Updated

2024-06-28T15:55:40.93802Z

class Bla {
    has $.a = 30;
    has $.b;
    has @.c;
    
    method TWEAK(|) {
        $!a := $!a<>;
        $!b := $!b<>;
        @!c := @!c<>;
    }
    method a { $!a = 42 }
    method b { $!b = 13 }
    method c { @!c = <a b c> }
}

# Bla.new.a; # breaks
# Bla.new.b; # breaks
Bla.new.c; # does not break
INFO