Return in macro quotations #13494
Unanswered
cquiroz
asked this question in
Metaprogramming
Replies: 1 comment 1 reply
-
That will be impossible with quasiquotes. It will require the use of the reflection API to create the What you are trying to encode is not really a return, it is a non-local return ( |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
While trying to port
spire
macros to scala 3 I found that it doesn't seem possible to have a return clause in inline. If I try to do something likeI get an error saying
No explicit return allowed from inlineable
As a bit of context I need this to allow functions calling the macro to return early, like
becoming
Beta Was this translation helpful? Give feedback.
All reactions