Diagnostic Code Reference

Tier 1 · Story 14Complete

This page is the comprehensive index of Tyhp compiler diagnostic codes. Every entry is
generated from the compiler's code registry (MessageCode.cs) and the localized short-message
catalog (.resx), so the message text always matches what the compiler emits.

Note

Diagnostic codes are stable identifiers. Once assigned, a code number always refers to the same
diagnostic, even across compiler versions. The canonical list of codes lives in
Tyhp/Domain/Exceptions/MessageCode.cs.

Tip

Run tyhp --explain TYHP#### (or tyhp explain ####) to print the
long-form explanation for any code. That command reads the same dynamic catalog as this page.

Looking up a code

tyhp --explain TYHP4008
tyhp explain 4008
tyhp explain --code=TYHP3003

Parser Errors (TYHP1xxx)

Parser errors occur during the ANTLR4 lexing and parsing phase when the compiler encounters syntax it cannot understand.

Visitor Errors (TYHP2xxx)

Visitor errors occur during parse-tree to AST conversion when the visitor encounters an unexpected structure or unsupported construct.

Binder Errors (TYHP3xxx)

Binder errors occur during symbol resolution and scope management.

Checker Errors (TYHP4xxx)

Checker errors occur during type checking and semantic analysis.

Emitter Errors (TYHP5xxx)

Emitter errors occur during PHP code generation.

Configuration Errors (TYHP6xxx)

Configuration errors are reported when tyhp.json or CLI options are invalid.

CLI Errors (TYHP7xxx)

CLI errors are reported by compiler actions (build, lint, init, and related commands).

Tyhpdef Errors (TYHP8xxx)

Tyhpdef errors are reported when loading or validating type-definition files.