Skip to content

CATCH allows SYMBOL pseudo-type. #71

@python-processing-unit

Description

@python-processing-unit

According to the specification section 9.1:

SYMBOL is a pseudo-type indicating that the argument MUST be a plain unquoted identifier; such operators receive the symbol name rather than its runtime value.

and the specification section 9.2.4:

Structured exception handling MUST use either TRY{ ... }CATCH{ ... } or TRY{ ... }CATCH(SYMBOL: name){ ... }. The CATCH block MUST immediately follow its TRY block, and exactly one CATCH block MUST be provided for each TRY statement.

The implementation, however, allows for the type annotation SYMBOL before the error name in the second form of CATCH, despite SYMBOL being a pseudo-type used in the documentation only.

prefix -source "TRY{}CATCH(SYMBOL: err){};PRINT('Shouldn\'t reach here.')"
Shouldn't reach here.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions