Skip to content
ZOLO / TE179 Type · error

linear type in a collection or generic parameter

Compiler diagnostic TE179: linear type in a collection or generic parameter.

Why this fires

A linear value is stored where the checker cannot follow it: in an array or map, or as the argument of a generic type whose body may drop or duplicate it.

struct Pool { conns: [Conn] }   // TE179

Option, Result, tuples and records hold linear values structurally and are fine.

Fix it

Keep each value in its own binding or field, or wrap the collection in a type that owns and consumes its elements. Bounds such as T: Linear arrive in a later phase.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

en