W2003 Warnings

missing-return

function may not return value

When this occurs

Function with return type but no return

Example error message

warning[W2003]: Function 'foo' declares return type(s) but has no return statement

Suppressing this warning

This warning can be suppressed using:

@suppress(W2003) or @suppress(missing_return)

How to fix

Ensure all code paths return a value, or suppress with `@Suppress(W2003)`.

Related errors