Created
February 15, 2020 22:27
-
-
Save Altreus/f9e40a1e6bc0893575051397f4f3a92a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> use Object::Delayed; | |
Nil | |
> class A { has $.a is rw; has $.b } | |
(A) | |
> class B { has $.delegate handles <a b> = slack { A.new(a => 1, b => 2); } } | |
(B) | |
> my $b = B.new; | |
B.new(delegate => A.new(a => 1, b => 2)) | |
> say $b.delegate.defined; | |
True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment