- or download this
sub echo(Int $x) {
say $x.^name;
...
--output:--
Int
echo() received 3
- or download this
sub echo(Int $x) {
...
--output:--
Int
- or download this
sub echo(Int:D $x) {
say $x.^name;
...
'Int', not a type object of type 'Int'. Did you forget a '.new'?
in sub echo at b.raku line 14
in block <unit> at b.raku line 18
- or download this
sub echo(Int:U $x) {
say $x.^name;
...
not an object instance of type 'Int'. Did you forget a 'multi'?
in sub echo at b.raku line 14
in block <unit> at b.raku line 22
- or download this
multi sub echo(Int:U $x) {
say $x.^name;
...
}
echo(3);
- or download this
sub echo(Int:D: $x) {
say $x.^name;
...
------> sub echo(Int:D: $x⏏) {
expecting any of:
constraint
- or download this
class Dog {
has Str $.name;
...
bark
bark
bark
- or download this
class Dog {
has Str $.name;
...
bark
bark
bark
- or download this
class Dog {
has Str $.name;
...
say "bark" for 1..$x;
}
}
- or download this
class Dog {
has Str $.name;
...
my $d = Dog.new(name => "Rover");
$d.bark(3);
- or download this
class Dog {
has Str $.name;
...
a type object of type 'Dog'. Did you forget a '.new'?
in method bark at b.raku line 30
in block <unit> at b.raku line 36
- or download this
class Dog {
has Str $.name;
...
bark
bark
bark
- or download this
class Dog {
has Str $.name;
...
in method bark at b.raku line 30
in block <unit> at b.raku line 39
- or download this
routine chr
multi sub chr(Int:D --> Str:D)
multi method chr(Int:D: --> Str:D)
- or download this
32] > chr(99);
c
- or download this
[33] > 99.chr
c
- or download this
my method m(Int:D: $b){
say self.^name
...
my $i = 1;
$i.&m(<a>);
# OUTPUT: «Int»