class Dog { has Str $.name; method bark(Dog:D: Int:D $x) { say self.^name; say "bark" for 1..$x; } } Dog.bark(3); --output:-- 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 36