Rule 10.2
Chapter 10, Extensions and capabilities Test
The compiler must derive requiredFeatures from the module and must report them through reflect(), with every implied capability included.
The rule text and the parts under it are the compiler's own English, as the design document writes them.
Rationale
a host activates features off reflect(), so the list must be the whole set and not the half the author named.
Derives from
requiredCaps and CAP_IMPLIES in src/core/passes/required-caps.ts.
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/core/backends/extension-profile.test.ts and required-caps.test.ts.
The files that verify it at commit 26de7be8, each at the first line that names the rule:
See also
- Rule 10.1 Test
- Rule 10.3 Test
- Design rules
- Error codes
Source
The rule at commit 26de7be8:
docs/language-design.md:1090(the design document)reqs/rules/RULE-1002.md(its traceability item)