Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multireturn from services don't work #478

Closed
DieMyst opened this issue Apr 4, 2022 · 1 comment · Fixed by #479
Closed

Multireturn from services don't work #478

DieMyst opened this issue Apr 4, 2022 · 1 comment · Fixed by #479
Assignees
Labels
bug Something isn't working

Comments

@DieMyst
Copy link
Member

DieMyst commented Apr 4, 2022

service GetMul("multiret-mut"):
    some_func2() -> u32, bool

func multiReturn() -> bool:
    res: *u8
    newState, finished <- GetMul.some_func2()
    <- finished

There is no finished value in air at all

                    (xor
                     (seq
                      (seq
                       (call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
                       (new $res
                        (call %init_peer_id% ("multiret-mut" "some_func2") [] newState)
                       )
                      )
                      (xor
                       (call %init_peer_id% ("callbackSrv" "response") [finished])
                       (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
                      )
                     )
                     (call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 2])
                    )
@DieMyst DieMyst added the bug Something isn't working label Apr 4, 2022
@DieMyst DieMyst self-assigned this Apr 4, 2022
@DieMyst
Copy link
Member Author

DieMyst commented Apr 4, 2022

Services can't return multiple results. Compiler must throw an error if service return multiple results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant