blob: 8fd721d4e79d724827dc81400ba571550a958599 (
plain) (
tree)
|
|
import scala.reflect.mirror._
object Test extends App {
class MyQuerycollection{
def findUserByName( name:String ) = {
val tree = reify{ "test" == name }.tree
val toolbox = mkToolBox()
toolbox.typeCheck(tree) match{
case Apply(Select(lhs,op),rhs::Nil) =>
println(rhs.tpe)
}
}
}
val qc = new MyQuerycollection
qc.findUserByName("some value")
}
|