MMTMMT Docs
Diagnostics

P009

postfix `!` is not supported

P009

The ! non-null assertion is not supported. Check the value for null first, or give a fallback with ??.

Failing example

script "example"
data chart = subscribe(data.ohlcv)
on chart.update { let value = chart.close! }

Corrected example

script "fixed"
data chart = subscribe(data.ohlcv)
on chart.update { let value = chart.close ?? 0.0 }

On this page