Skip to content

Instantly share code, notes, and snippets.

@DmytroMitin
Last active July 11, 2018 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DmytroMitin/a95c9fa500c6129f8143690835046cff to your computer and use it in GitHub Desktop.
Save DmytroMitin/a95c9fa500c6129f8143690835046cff to your computer and use it in GitHub Desktop.
dotty macros
object App {
def main(args: Array[String]): Unit = {
App1.hello()
}
}
import scala.quoted._
object App1 {
inline def hello(): Unit = ~ helloImpl()
def helloImpl(): Expr[Unit] = '{ println("Hello") }
}
dotc App1.scala
dotc App.scala
scala App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment