You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scala>importreflect.macros.Contextimportreflect.macros.Context
scala>abstractclassMacroBase {
|defmacroImpl[T: c.WeakTypeTag](c: Context)(body: c.Expr[T]): c.Expr[Any] = c.universe.reify(body.splice)
| }
defined classMacroBase
scala>objectMacroextendsMacroBase {
|defmacroDecl[T](body: T) = macro macroImpl[T]
| }
defined module Macro
scala>Macro.macroDecl(0)
error: macro implementation not found: macroDecl (the most common reason for that is that you cannot use macro implementations in the same compilation run that defines them)
By contrast, this works:
The text was updated successfully, but these errors were encountered: