Created
June 7, 2019 07:04
-
-
Save Whateverable/1b8b1ea8c8bbb83676f5e8fb0a5c7f1e to your computer and use it in GitHub Desktop.
bisectable6
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
role Foo { has Int $.foo; submethod BUILD(Int :$foo) { $!foo = $foo; }; class Bar does Foo { submethod TWEAK(:$foo = 1) { $!foo := $foo; } }; my Bar $bar .= new; say $bar.foo |
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
Output on both points: «===SORRY!=== Error while compiling /tmp/xivJINgsKf | |
Cannot declare our-scoped class inside of a role | |
(the scope inside of a role is generic, so there is no unambiguous | |
package to install the symbol in) | |
at /tmp/xivJINgsKf:1 | |
------> o) { $!foo = $foo; }; class Bar does Foo⏏ { submethod TWEAK(:$foo = 1) { $!foo := | |
» |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment