MMTMMT Docs
Diagnostics

T206

parameter default is not a literal constant

T206

Function parameter defaults must be literal constants, not reads or calls. Replace the default with a literal and compute dynamic values in the body.

Failing example

script "example"
state base = 1
fn value(x: int = base) -> int { return x }

Corrected example

script "fixed"
fn value(x: int = 1) -> int { return x }

On this page