aboutsummaryrefslogblamecommitdiff
path: root/tests/disabled/macro/run/t5704.scala
blob: b9765ebb62ecda4708526391da6cd42f8cf3a4e6 (plain) (tree)
1
2
3
4
5
6




                                                  
                                             











                                              
 
import scala.reflect.runtime.universe._
import scala.reflect.runtime.{universe => ru}
import scala.reflect.runtime.{currentMirror => cm}
import scala.tools.reflect.ToolBox

object Test extends dotty.runtime.LegacyApp {
  class MyQuerycollection{
    def findUserByName( name:String ) = {
      val tree = reify{ "test" == name }.tree
      val toolbox = cm.mkToolBox()
      toolbox.typecheck(tree) match{
        case Apply(Select(lhs,op),rhs::Nil) =>
          println(rhs.tpe)
      }
    }
  }
  val qc = new MyQuerycollection
  qc.findUserByName("some value")
}