E3012 Types Errors

Types

addr() needs a variable, field, or array element; the address of a value like 42 cannot be taken

When this occurs

Returning wrong type

Example error message

error[E3012]: return type mismatch: expected int, got string

How to fix

Ensure your return value matches the declared return type.

Related errors