Documentation for method what
assembled from the following pages:
Class: X::Cannot::Empty §
From X::Cannot::Empty
(X::Cannot::Empty) method what §
method what()
Returns the type that was the target of the action.
Class: X::Cannot::Lazy §
From X::Cannot::Lazy
(X::Cannot::Lazy) method what §
method what()
Returns the type that was the target of the action, if it was not the lazy list itself.
Class: X::OutOfRange §
From X::OutOfRange
(X::OutOfRange) method what §
method what(--> Str)
Verbal description of the thing that was out of range (e.g. "array index"
, "month"
).
Class: X::Redeclaration §
From X::Redeclaration
(X::Redeclaration) method what §
Returns the kind of symbol that was redeclared. Usually symbol
, but can also be routine
, type
etc.
Class: X::Syntax::Malformed §
From X::Syntax::Malformed
(X::Syntax::Malformed) method what §
method what(X::Syntax::Malformed: --> Str)
Returns a description of the thing that was being parsed.
Class: X::Syntax::Missing §
From X::Syntax::Missing
(X::Syntax::Missing) method what §
method what(--> Str)
Returns a string description of the missing syntax element.
Class: X::Syntax::Variable::Numeric §
From X::Syntax::Variable::Numeric
(X::Syntax::Variable::Numeric) method what §
method what returns Str
Returns a verbal description of the kind of symbol that was declared (variable, parameter, attribute).
Class: X::Undeclared §
From X::Undeclared
(X::Undeclared) 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
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.
Class: IO::Special §
From IO::Special
(IO::Special) method what §
say .path.what; # OUTPUT: «<STDIN>» say .path.what; # OUTPUT: «<STDOUT>» say .path.what; # OUTPUT: «<STDERR>»
Returns one of the strings '<STDIN>'
, '<STDOUT>'
, or '<STDERR>'
, specifying the type of the special IO device.