8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7631fcb commit bbca719Copy full SHA for bbca719
overviews/macros/typemacros.md
@@ -33,8 +33,9 @@ The full source code of the `H2Db` type macro is provided [at Github](https://gi
33
def impl(c: Context)(url: c.Expr[String]): c.Tree = {
34
val name = c.freshName(c.enclosingImpl.name).toTypeName
35
val clazz = ClassDef(..., Template(..., generateCode()))
36
- c.introduceTopLevel(clazz)
37
- Apply(Ident(name), List(Literal(Constant(c.eval(url)))))
+ c.introduceTopLevel(c.enclosingPackage.pid.toString, clazz)
+ val classRef = Select(c.enclosingPackage.pid, name)
38
+ Apply(classRef, List(Literal(Constant(c.eval(url)))))
39
}
40
41
object Db extends H2Db("coffees")
0 commit comments