blob: b0ce6507f81caf1a9a0f4cc7201099e188117a20 (
plain) (
tree)
|
|
import scala.reflect.makro.Context
object B { override def toString = "object" }
class C { override def toString = "class" }
package foo {
object B { override def toString = "package > object" }
class C { override def toString = "package > class" }
}
object foo {
object B { override def toString = "object > object" }
class C { override def toString = "object > class" }
}
object packageless {
def impl(c: Context) = {
import c.universe._
reify {
println(B)
println(new C)
println(foo.B)
println(new foo.C)
println(_root_.foo.B)
println(new _root_.foo.C)
}
}
def test = macro impl
}
package packageful {
object Test {
def impl(c: Context) = {
import c.universe._
reify {
println(B)
println(new C)
println(foo.B)
println(new foo.C)
println(_root_.foo.B)
println(new _root_.foo.C)
}
}
def test = macro impl
}
}
|