Rule 4.5
Chapter 4, Types Test
A TypeScript type the GPU has no word for must be refused in one sentence naming the reason and what to write instead; the list is surface §28 and is not repeated here.
The rule text and the parts under it are the compiler's own English, as the design document writes them.
Rationale
the constraint is the target’s, and the sentence has to say so at the line the author wrote.
Derives from
surface §28 (roadmap 0.3 item T10); Plain Types for what a value type is.
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:
src/compiler/ts/honest-refusals.test.ts.
The files that verify it at commit 26de7be8, each at the first line that names the rule:
Explained in
The sections of the surface document that explain this rule, at commit 26de7be8:
See also
- Rule 4.4 Test
- Rule 4.6 Test
- Design rules
- Error codes
Source
The rule at commit 26de7be8:
docs/language-design.md:301(the design document)reqs/rules/RULE-0405.md(its traceability item)