Rule 8.1
Chapter 8, Functions and entry points Test
An entry point is a top-level function; an entry method on a class must be refused.
The rule text and the parts under it are the compiler's own English, as the design document writes them.
Rationale
this is not a GPU instance, and an entry has no receiver.
Derives from
Entry Points; surface §3 and §4.
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:
TS8035 CLASS_MEMBER (A decorator has no place on "C.k"; an entry is a top-level function.), beside surface §7’s row “@compute method on a class”.
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:
Error codes that enforce it
The diagnostic codes the rule names under Enforced by, or whose registry text names the rule:
See also
- Rule 7.9 Test
- Rule 8.2 Test
- Design rules
- Error codes
Source
The rule at commit 26de7be8:
docs/language-design.md:612(the design document)reqs/rules/RULE-0801.md(its traceability item)