0110: Function must return N values
Compiler found that number of values in return statement does not match function signature. It can happen if return has more or fewer values.
For example, if function has not declared any return type, it's incorrect to return values from it:
function foo
  return 1 // error, `foo` should return nothing
endSimilarly, it is incorrect to return nothing, when the function has declared a return type:
function bar: int
  return
endPossible solutions:
- check a number of returned values following a - returnkeyword. Make sure this number matches the number of return types declared in the function's signature
- if the function may, under some condition, return nothing (a fallible function), its return type must be prepended with an - optionalkeyword:
function bar: optional int
  if ...
  then
    return 1
  else
   return
  end
endPrevious0109: Expected variables to store function resultNext0111: Function not found in current scope
Last updated
