Context
Derived from the 2026-04-25 and 2026-04-28 Claude Code usage review.
Claude Code reported compiler errors such as internal parser/type mismatch codes without enough user-oriented explanation, and multiline literal union syntax appeared to be rejected even though literal-only unions are semantically supported.
Current assessment
SPEC status: diagnostic structure is provided, but quality may be insufficient. Literal-only unions are supported semantically; multiline parsing appears to be parser/DX work rather than a new semantic feature.
CompileDiagnostic already has structure for severity, code, message, location, source, and optional suggestion. The implementation should fill these fields with intent-oriented messages and suggestions where possible.
Desired outcome
Improve compiler diagnostic messages/suggestions and accept line breaks in literal-only union syntax where the grammar should allow it.
Acceptance criteria
- Diagnostics for common parser/type errors include actionable messages and
suggestion when useful.
- Multiline literal-only union syntax is parsed or explicitly documented if intentionally unsupported.
- Tests cover
type X = "a" | "b" | "c" across multiple lines.
- Non-trivial arbitrary unions remain rejected unless a separate SPEC change authorizes them.
Context
Derived from the 2026-04-25 and 2026-04-28 Claude Code usage review.
Claude Code reported compiler errors such as internal parser/type mismatch codes without enough user-oriented explanation, and multiline literal union syntax appeared to be rejected even though literal-only unions are semantically supported.
Current assessment
SPEC status: diagnostic structure is provided, but quality may be insufficient. Literal-only unions are supported semantically; multiline parsing appears to be parser/DX work rather than a new semantic feature.
CompileDiagnosticalready has structure for severity, code, message, location, source, and optional suggestion. The implementation should fill these fields with intent-oriented messages and suggestions where possible.Desired outcome
Improve compiler diagnostic messages/suggestions and accept line breaks in literal-only union syntax where the grammar should allow it.
Acceptance criteria
suggestionwhen useful.type X = "a" | "b" | "c"across multiple lines.