=begin pod :kind("Type") :subkind("class") :category("exception")

=TITLE class X::Attribute::NoPackage

=SUBTITLE Compilation error due to declaring an attribute outside of a package

    class X::Attribute::NoPackage does X::Comp { }

Compile time error thrown when an attribute is declared where it does
not make sense (for example in the mainline).

For example

=for code
has $.x;

Dies with

=for code :lang<text>
You cannot declare attribute '$.x' here; maybe you'd like a class or a role?

=head1 Methods

=head2 method name

    method name(--> Str:D)

Returns the name of the attribute

=end pod
