aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/uninit_loop.zc
Commit message (Collapse)AuthorAgeFilesLines
* definite assignment: reading a local before it is initialized is a compile ↵Gravatar zinc 12 days1-0/+11
error (spec 4.1.5, b.1.9) track linited per local alongside the ownership state; snapshots, exit records and joins carry it, and a join keeps a local set only when every reaching path set it. x = e, a declaration initializer, &x (out-parameter), a full array initializer, or using an aggregate as an address set a local; field and element writes do not set the aggregate. while/for bodies that may run zero times do not count; do/while does. compiler, runtime, std, actor and lsp sources initialize the locals the rule flagged; zc0 accepts = {} brace lists (zeroed). tests: tests/errors/uninit_*.zc, tests/conformance/4-statements/uninit_*.zc