Rule 12.5
Chapter 12, Diagnostics Test
The message text is part of the contract: a test that pins a refusal must assert the code and the text, and a change to the text is a change to the surface.
The rule text and the parts under it are the compiler's own English, as the design document writes them.
Rationale
an issue’s “Expected” row spells the sentence, and the sentence is what the author sees.
Derives from
the refusal tests under src/compiler/ts/, which pin the text, and the “Expected” section of each issue of #162, which spells it.
How it is verified
Checked by a test. A test, a gate script or a CI workflow names this rule, and the traceability check fails when a file listed below stops naming it.
Where the rule says the compiler enforces it:
the refusal tests under src/compiler/ts/.
The files that verify it at commit 26de7be8, each at the first line that names the rule:
See also
- Rule 12.4 Test
- Rule 12.6 Test
- Design rules
- Error codes
Source
The rule at commit 26de7be8:
docs/language-design.md:1254(the design document)reqs/rules/RULE-1205.md(its traceability item)