E3071 Types Errors

Types

cannot 'return nil' from a function whose return type contains '?'; 'nil' is not a valid value for every binding (e.g. int, string)

When this occurs

This error is triggered when: cannot 'return nil' from a function whose return type contains '?'; 'nil' is not a valid value for every binding (e.g. int, string)

Example error message

error[E3071]: cannot 'return nil' from a function whose return type contains '?'; 'nil' is not a valid value for every binding (e.g. int, string)

How to fix

Review the error message and check your code at the indicated location. The message describes what went wrong — fix the underlying issue it identifies.

Related errors

No related errors.