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

Allow empty return statements #446

Merged
merged 2 commits into from
Jan 9, 2024

Conversation

eschnett
Copy link
Contributor

No description provided.

@eschnett
Copy link
Contributor Author

Closes #443.

@pxl-th
Copy link
Collaborator

pxl-th commented Dec 24, 2023

Does it allow multiple return statements?

function ker()
    ...
    if something()
       return
    end
    ...
    if something_else()
       return
    end
    ...
    return
end

@eschnett
Copy link
Contributor Author

It does. But – should it?

@pxl-th
Copy link
Collaborator

pxl-th commented Dec 25, 2023

I'd like to have this option. Right now I find myself writing wrapper functions that I call from the kernel just to be able to use return statements.

@eschnett
Copy link
Contributor Author

eschnett commented Jan 8, 2024

ping Could you let the CI workflows run for this PR?

@pxl-th pxl-th merged commit c5c0d34 into JuliaGPU:main Jan 9, 2024
26 of 28 checks passed
vchuravy added a commit that referenced this pull request Feb 26, 2024
vchuravy added a commit that referenced this pull request Feb 26, 2024
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

Successfully merging this pull request may close these issues.

2 participants