Skip to content
ZOLO / TE191 Type · error

record projection requires unique visible physical fields and a proven copyable record

Compiler diagnostic TE191: record projection requires unique visible physical fields and a proven copyable record.

Why this fires

user.{ id, name } returns an anonymous record containing exactly the selected fields, in source order and with their declared types. The base evaluates once.

Names must be unique visible physical fields. Projection does not run getters, copy nominal tags, choose another nominal type, rename fields, select a nested path, apply defaults or transfer resource ownership.

Unwrap or narrow an optional/unknown base before projecting it. Use a visible physical member rather than an accessor. Correct a misspelled field using the suggested rename when one is available.

The initial ownership policy also refuses every linear/resource-bearing or unproved base, even when the selected subset contains only primitive fields. This is separate from the prohibition on copying a selected linear field. Generic T, any, unresolved aliases and nominal spelling without a checked declaration are insufficient proof. Explicit owned borrowing support may extend the base policy later.

The JavaScript subset currently rejects typed projection explicitly. Comptime and AOT require the checked front-end preparation and retained exact-type proof.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en