Skip to content

Instantly share code, notes, and snippets.

@Whateverable
Created December 9, 2019 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Whateverable/7eaf82b2b211b3db7de6373322b74225 to your computer and use it in GitHub Desktop.
Save Whateverable/7eaf82b2b211b3db7de6373322b74225 to your computer and use it in GitHub Desktop.
evalable6
role R[Str:D $_n]{our $n = $_n};role R2[Str:D $n]{also does R[$n]};class A does R2['asd'] {};say A.n
(exit code 1)
===SORRY!=== Error while compiling /tmp/lDXmpVPzso
Cannot declare our-scoped variable 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/lDXmpVPzso:1
------> role R[Str:D $_n]{our $n⏏ = $_n};role R2[Str:D $n]{also does R[$n
expecting any of:
constraint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment