The OpenD Programming Language

Warn.onOverflow

Called automatically upon an overflow during a unary or binary operation.

  1. typeof(~Lhs()) onOverflow(Lhs lhs)
  2. typeof(Lhs() + Rhs()) onOverflow(Lhs lhs, Rhs rhs)
    struct Warn
    static
    typeof(Lhs() + Rhs())
    onOverflow
    (
    string x
    Lhs
    Rhs
    )
    (
    Lhs lhs
    ,
    Rhs rhs
    )

Parameters

x

The operator involved

Lhs

The first argument of Checked, e.g. int if the left-hand side of the operator is Checked!int

Rhs

The right-hand side type involved in the operator

Return Value

Type: typeof(Lhs() + Rhs())

mixin(x ~ "lhs") for unary, mixin("lhs" ~ x ~ "rhs") for binary

Meta