class Dog { has Str $.name; method bark(Dog:D $dog: Int:D $x) { say $dog.^name; say $dog.name; say "bark" for 1..$x; } } my $d = Dog.new(name => 'Rover'); $d.bark(3); Dog.bark(3); --output:-- Dog Rover bark bark bark Invocant of method 'bark' must be an object instance of type 'Dog', not a type object of type 'Dog'. Did you forget a '.new'? in method bark at b.raku line 30 in block at b.raku line 39