0125: Unexpected return type in function
Compiler found a function's return type that wasn't expected in this position.
Function's return type is a combination of words optional
, logical
, primitive types such as Int
, or Float
, and class names.
logical
type can't be mixes with other types:
function foo: logical, int // Error: unexpected return type int in function foo.
optional
modifier must precede the return type:
function foo: int, optional // Error: unexpected return type int in function foo.
You can't return types that are not known to the compiler:
function foo: unknown // Error: Unexpected return type unknown in function foo.
Possible solutions:
check your function definition and provide correct order of return types.
Previous0124: Foreign functions can't return more than one valueNext0126: Can't export a foreign function definition
Last updated