MMTMMT Docs
Diagnostics

T302

struct contains itself

T302

A struct contains itself directly or through other structs/arrays, giving it infinite size. Break the cycle with an ID or another non-owning representation.

Failing example

script "example"
type Node { child: Node }

Corrected example

script "fixed"
type Child { value: int }
type Parent { child: Child }

On this page