E3072 Types Errors

Types

cannot return 'nil' from a function that returns '%s'; nil is only valid for pointer and error types

When this occurs

This error is triggered when: cannot return 'nil' from a function that returns '%s'; nil is only valid for pointer and error types

Example error message

error[E3072]: cannot return 'nil' from a function that returns '%s'; nil is only valid for pointer and error types

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.