scala/scala — pull request #3326 by folone (2014-01-06 09:07:34+00:00)
Title: Materializes Liftable instances for arbitrary case classes.

Now case classes can be used in quasiquotes.

```scala
Welcome to Scala version 2.11.0-20140105-195053-c1b3d94af9 (OpenJDK 64-Bit Server VM, Java 1.7.0_45).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import scala.reflect.runtime.{universe => u}
import scala.reflect.runtime.{universe=>u}

scala> import u._
import u._

scala> case class Test(str: String, i: Int, lst: List[Double])
defined class Test

scala> val test = Test("test", 1, List(2.0, 3.5))
test: Test = Test(test,1,List(2.0, 3.5))

scala> showRaw(q"$test")
res0: String = Apply(Select(Select(Select(Select(Select(Ident($line8.$read), TermName("$iw")), TermName("$iw")), TermName("$iw")), TermName("$iw")), TermName("Test")), List(Literal(Constant("test")), Literal(Constant(1)), Apply(Select(Select(Select(Ident(scala), TermName("collection")), TermName("immutable")), TermName("List")), List(Literal(Constant(2.0)), Literal(Constant(3.5))))))

scala> val cm = runtimeMirror(getClass.getClassLoader)
cm: reflect.runtime.universe.Mirror = JavaMirror with scala.tools.nsc.interpreter.IMain$TranslatingClassLoader@74a2ccbd of type class scala.tools.nsc.interpreter.IMain$TranslatingClassLoader with classpath [(memory)] and parent being scala.reflect.internal.util.ScalaClassLoader$URLClassLoader@6c2fc81d of type class scala.reflect.internal.util.ScalaClassLoader$URLClassLoader with classpath [file:/usr/lib/jvm/java-7-openjdk/jre/lib/resources.jar,file:/usr/lib/jvm/java-7-openjdk/jre/lib/rt.jar,file:/usr/lib/jvm/java-7-openjdk/jre/lib/jsse.jar,file:/usr/lib/jvm/java-7-openjdk/jre/lib/jce.jar,file:/usr/lib/jvm/java-7-openjdk/jre/lib/charsets.jar,file:/usr/lib/jvm/java-7-openjdk/jre/lib/rhino.jar,file:/home/folone/workspace/scala/build/quick/classes/library/,file:/home/folone/workspace/scala/...
scala> import scala.tools.reflect.ToolBox
import scala.tools.reflect.ToolBox

scala> val tb = cm.mkToolBox()
tb: scala.tools.reflect.ToolBox[reflect.runtime.universe.type] = scala.tools.reflect.ToolBoxFactory$ToolBoxImpl@e01afa1

scala> tb.eval(q"$test")
res1: Any = Test(test,1,List(2.0, 3.5))

scala> .asInstanceOf[Test]
res2: Test = Test(test,1,List(2.0, 3.5))
```

Review by @xeno-by, @densh, and @retronym please.