Skip to content

Conversation

@mosyp
Copy link

@mosyp mosyp commented May 17, 2018

Old docs (https://docs.scala-lang.org/overviews/macros/overview.html#a-complete-example) has a paragraph which says:

An important aspect of macrology is separate compilation. To perform macro expansion, compiler needs a macro implementation in executable form. Thus macro implementations need to be compiled before the main compilation, otherwise you might see the following error:

However dotty throws unclear error so far so I opened and issue #4540 and submitted only simple note to code snippet as a remainder

Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

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

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Have an awesome day! ☀️

}


// has to be in different compilation unit
Copy link
Contributor

Choose a reason for hiding this comment

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

We can be even clearer.

}
object App {
   // has to be in a different compilation unit that depends on Macros

Copy link
Author

Choose a reason for hiding this comment

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

make sense!

@nicolasstucki
Copy link
Contributor

@mentegy did you sigh the CLA?

@allanrenucci
Copy link
Contributor

CLA signed

@mosyp
Copy link
Author

mosyp commented May 22, 2018

@nicolasstucki done

@nicolasstucki
Copy link
Contributor

Thanks @mentegy

@nicolasstucki nicolasstucki merged commit 91de029 into scala:master May 22, 2018
@mosyp mosyp deleted the patch-1 branch May 22, 2018 13:39
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.

5 participants