perl6/doc/lib/X/Declaration/Scope
doc src
(title) class X::Declaration::Scope
class X::Declaration::Scope does X::Comp { }
Compile time error thrown when a declaration does not harmonize with the
declared scope.
For example
has sub f() { }
dies with
===SORRY!===
Cannot use 'has' with sub declaration
Methods
(head2) scope
method scope() returns Str:D
Returns a string representation of the scope, usually the same keyword that is
used for the declaration ( "my" , "our" , "has" , ...);
(head2) declaration
method declaration() returns Str:D
Describes the symbol that has been declared in a wrong scope.