E5005 Runtime Errors

nil-operation

cannot perform operation on nil

When this occurs

`nil + 1`

Example error message

error[E5005]: nil reference: cannot use nil with operator '+'

How to fix

Check that the value is not nil before performing operations on it.

Related errors