E3024 Type Errors

missing-return-statement

function must return a value

When this occurs

Function declares return type but has no return statement

Example error message

error[E3024]: function 'calculate' must return a value of type 'int'

How to fix

Add a return statement with a value matching the declared return type.

Related errors