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

=TITLE class X::Undeclared

=SUBTITLE Compilation error due to an undeclared symbol

    class X::Undeclared does X::Comp {}

Thrown when the compiler encounters a symbol that has not been declared,
but needs to be.

Example

=for code :skip-test<compile time error>
$x;

results in

=for code :lang<text>
===SORRY!===
Variable $x is not declared

=head1 Methods

=head2 method symbol

Returns the name of the undeclared symbol

=head2 method what

Returns the kind of symbol that was not declared (for example variable,
type, routine).

Since The symbol wasn't declared, the compiler sometimes has to guess
(or rather disambiguate) what kind of symbol it encounter that wasn't
declared. For example if you write

=for code :skip-test<compile time error>
say a;

Then the disambiguation defaults to reporting a missing subroutine, even
though declaring a C<constant a = 'a'> would also make the error go away.

=end pod
