what
ErrorsCollection

what

Synthesised documentation from type/X/Undeclared type/X/Syntax/Malformed type/X/Cannot/Empty type/X/Syntax/Variable/Numeric type/X/Cannot/Lazy type/X/OutOfRange type/X/Redeclaration type/IO/Special type/X/Syntax/Missing

From type/X/Undeclared

See Original text in context

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

say a;

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

From type/X/Syntax/Malformed

See Original text in context

method what(X::Syntax::Malformed:D: --> Str)

Returns a description of the thing that was being parsed.

From type/X/Cannot/Empty

See Original text in context

method what()

Returns the type that was the target of the action.

From type/X/Syntax/Variable/Numeric

See Original text in context

method what returns Str:D

Returns a verbal description of the kind of symbol that was declared (variable, parameter, attribute).

From type/X/Cannot/Lazy

See Original text in context

method what()

Returns the type that was the target of the action, if it was not the lazy list itself.

From type/X/OutOfRange

See Original text in context

method what(--> Str:D)

Verbal description of the thing that was out of range (e.g. "array index", "month").

From type/X/Redeclaration

See Original text in context

Returns the kind of symbol that was redeclared. Usually symbol, but can also be routine, type etc.

From type/IO/Special

See Original text in context

say $*IN.path.what;  # OUTPUT: «<STDIN>␤» 
say $*OUT.path.what# OUTPUT: «<STDOUT>␤» 
say $*ERR.path.what# OUTPUT: «<STDERR>␤»

Returns one of the strings '<STDIN>', '<STDOUT>', or '<STDERR>', specifying the type of the special IO device.

From type/X/Syntax/Missing

See Original text in context

method what(--> Str:D)

Returns a string description of the missing syntax element.