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

"Missing return statement" error with check/detect blocks #32

Open
alleew opened this issue Aug 12, 2022 · 0 comments
Open

"Missing return statement" error with check/detect blocks #32

alleew opened this issue Aug 12, 2022 · 0 comments
Assignees

Comments

@alleew
Copy link
Contributor

alleew commented Aug 12, 2022

If you create an action with return statements in a check/detect block, the compiler will flag it as invalid due to missing a return statement, even if the action is guaranteed to return something. The code below reproduces the issue.

// BEGINNING OF CODE SAMPLE
class Main
action Main
Thing()
end

action Thing returns integer
    check
        return 0
    detect error
        return 1
    end
end

end
// END OF CODE SAMPLE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants