-
Notifications
You must be signed in to change notification settings - Fork 267
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Having a function that returns a single value should be allowed to be out (just like forward and move).
To Reproduce
main: () -> int = {
return my_call();
}
my_call: () -> out result: int = {
result = EXIT_SUCCESS;
}Outputs:
test.cpp2...
test.cpp2(4,16): error: only 'forward' and 'move' return passing style are allowed from functions (at 'out')
Additional context
Do note that having parentheses make the example work, but I don't see why having a single out parameter shouldn't work:
main: () -> int = {
return my_call();
}
my_call: () -> (out result: int) = {
result = EXIT_SUCCESS;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working