Rule 6.4
Chapter 6, Declarations and resources Test
A pipeline-overridable constant must be written const x: override<T> = default or declare const x: override<T>.
The rule text and the parts under it are the compiler's own English, as the design document writes them.
Rationale
WGSL’s override has no TypeScript form, so the wrapper is the one place the word appears (§9.3, family 2).
Derives from
override Declarations; surface §15.
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:
examples/override-constants.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 6.3 Test
- Rule 6.5 Test
- Design rules
- Error codes
Source
The rule at commit 26de7be8:
docs/language-design.md:421(the design document)reqs/rules/RULE-0604.md(its traceability item)