-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Macro with Unit type splicing non Unit fails with splice outside quotes
#3912
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
Comments
This should probably be done in |
Why is this not expanded to a macro? |
We could expand it to a macro. We would need to not insert the explicit |
Where is it best to transform the shape of the tree? In |
|
The following macro has a similar issue
In both cases the code that is splices is found in a block as statement or expression position. We probably handle these as part of the Inlined branch conditions. |
Fix #3912: Account for units and blocks in inline and macros
fails with
because
inline def foo(): Unit = ~impl()
is transformed toinline def foo(): Unit = { ~impl(); () }
, which is correct.We need a better error message for this.
The text was updated successfully, but these errors were encountered: