blob: f48e84f1ded046536fac8000add597b0dd5cdd5f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
import scala.reflect.macros.WhiteboxContext
import scala.language.experimental.macros
object Macros {
def impl(c: WhiteboxContext) = {
import c.universe._
q"if (true) Some(2) else None"
}
def foo: Any = macro impl
}
|