Skip to content

Instantly share code, notes, and snippets.

@2colours
Created September 23, 2022 11:00
Show Gist options
  • Save 2colours/d874683fb07aabca81c6c4e8d0e021e7 to your computer and use it in GitHub Desktop.
Save 2colours/d874683fb07aabca81c6c4e8d0e021e7 to your computer and use it in GitHub Desktop.
class Fe::Fi::Fo {
has $.fum;
method gist { $!fum }
}
class Fe::Fi {
method fo(:$fum) { Fe::Fi::Fo.new(:$fum) }
}
my $fi = Fe::Fi.new;
say $fi.fo(fum => 'x').WHAT;
# Cannot look up attributes in a Fe::Fi::Fo type object.
# Did you forget a '.new'?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment