Skip to content

Conversation

@nicolasstucki
Copy link
Contributor

@nicolasstucki nicolasstucki commented Jul 10, 2019

Currently the same code is used to check that the macro bodies are valid and to interpret the tree.
Adding more functionality to the interpreters usually ends up affecting the validity check. This has proven to allow unexpected arguments to be accepted in the macro body.

The solution is to split the two implementations. The validity check will accept a subset of the trees that the interpreter can handle.

@nicolasstucki nicolasstucki force-pushed the split-macro-body-check-from-interpreter branch 2 times, most recently from 6d9f314 to 489a396 Compare July 10, 2019 08:42
@nicolasstucki nicolasstucki marked this pull request as ready for review July 10, 2019 09:16
@nicolasstucki nicolasstucki requested a review from liufengyun July 10, 2019 09:24
@nicolasstucki nicolasstucki force-pushed the split-macro-body-check-from-interpreter branch 2 times, most recently from 1764e28 to 73bf699 Compare July 11, 2019 09:29
@nicolasstucki nicolasstucki force-pushed the split-macro-body-check-from-interpreter branch from b838d71 to 00c7125 Compare July 11, 2019 09:44
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

LGTM

@nicolasstucki nicolasstucki merged commit e2130b9 into scala:master Jul 11, 2019
@nicolasstucki nicolasstucki deleted the split-macro-body-check-from-interpreter branch July 11, 2019 20:14
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