Script.static_assert

Script.static_assert

static Script.static_assert(cond, msg)

Assert a compile-time condition.

Raises AssertionError at compile time if the condition is false. The condition must be a compile-time constant (a bool or a Constant expression).

Parameters:
  • cond (bool | Expr) – The compile-time condition to check. Must be a constant value.

  • msg (str) – The error message to display if the assertion fails.

Return type:

None