Skip to content

Improve documentation underlyingArgument #14619

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

Merged
merged 1 commit into from
Mar 16, 2022
Merged

Conversation

nicolasstucki
Copy link
Contributor

Close #14510

* The resulting tree is useful for inspection of the value or content of a non-inline argument.
*
* Warning: This tree may contain references that are out of scope and should not be used in the generated code.
* This method should only used to port Scala 2 that used to access their outer scope unsoundly.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it's safe to use this method for macros that don't splice the underlying argument anywhere, right?
Also, it'd be helpful to have an example showing what people should write instead of using underlying/underlyingArgument, because it's not clear to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it'd be helpful to have an example showing what people should write instead of using underlying/underlyingArgument, because it's not clear to me.

That is basically all the text in the macro tutorial related to inline arguments, value extraction and quote pattern matching.

@smarter smarter assigned nicolasstucki and unassigned smarter Mar 14, 2022
@smarter smarter merged commit 3d06d94 into scala:main Mar 16, 2022
@smarter smarter deleted the fix-#14510 branch March 16, 2022 14:11
@Kordyjan Kordyjan added this to the 3.1.3 milestone Aug 2, 2023
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.

Enum values are not properly reused due to underlyingArgument in macros
3 participants