Completes comptime-cursor tuple indexing (started by the read path infee86adf) and unblocks the `race` runtime synthesis. Five enablers: 1. Named-tuple-literal type inference preserves element NAMES. A `.(a = x, b = y)` passed DIRECTLY as a `$T` argument inferred to a tuple with `.names = null`, so `field_name(T, i)` reflected "" and a `make_enum` over those labels collided on the empty name. The typer now mirrors `lowerTupleLiteral`'s name capture. 2. `inferExprType` resolves a comptime-constant tuple index to the i-th field's CONCRETE type (the inference sibling of thefee86adfread path), so `tup[i].field` / methods / comparisons on it resolve. 3. Tuple-element L-VALUES by comptime index — `tup[i] = v`, `tup[i].f = v`, `@tup[i]` — lower to a typed `structGep` of field i across all four paths (`lowerAssignment`, the multi-assign store, `lowerExprAsPtr`, and address-of-index). Previously each emitted an `index_gep` with a `ptrTo(.unresolved)` element type (a tuple has no uniform element) that panicked at LLVM emit. An out-of-range comptime index now diagnoses loudly on every path instead of falling through to that panic. 4. A user generic `($X..) -> Type` call is recognized as type-shaped (`isTypeReturningCallNode`), so it can bind a `$E: Type` parameter — e.g. `make_variant(RaceResult(T), i, …)`. The static `isTypeShapedAstNode` only knew the type-returning builtins (field_type/pointee/type_of). Locked by examples/comptime/0652 (read,fee86adf) and 0653 (store + address-of + element-pointer field store).
1.5 KiB
1.5 KiB