Closed
Description
When macro definition and macro call is written within the same compilation unit, compiler errors with:
Could not find interpreted class Main in classpath
, see https://scastie.scala-lang.org/h8cEUZIER2mT6YBtl4wFlA as example.
It'd be great to add a compiler hint as it was in scala.reflect macros: error: macro implementation not found: printf (the most common reason for that is that you cannot use macro implementations in the same compilation run that defines them)
and improve docs in http://dotty.epfl.ch/docs/reference/principled-meta-programming.html
See last paragraph of https://docs.scala-lang.org/overviews/macros/overview.html#a-complete-example for example