summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDenys Shabalin <denys.shabalin@typesafe.com>2014-03-17 10:24:17 +0100
committerDenys Shabalin <denys.shabalin@typesafe.com>2014-03-17 10:30:45 +0100
commitb6a54a8fa71515fd97c5f225c11b24d971a703c8 (patch)
tree253a16183cc6a93cc0661f8edb58c731513d0816 /test
parent79f7e05c082a1810f9315e19658e20af15b08235 (diff)
downloadscala-b6a54a8fa71515fd97c5f225c11b24d971a703c8.tar.gz
scala-b6a54a8fa71515fd97c5f225c11b24d971a703c8.tar.bz2
scala-b6a54a8fa71515fd97c5f225c11b24d971a703c8.zip
SI-8420 don't crash on unquoting of non-liftable native type
Previously quasiquote's type-based dispatch failed to handle situation where unquotee's type is native but non-liftable and was used to splice with non-zero cardinality.
Diffstat (limited to 'test')
-rw-r--r--test/files/scalacheck/quasiquotes/ErrorProps.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/files/scalacheck/quasiquotes/ErrorProps.scala b/test/files/scalacheck/quasiquotes/ErrorProps.scala
index 3d9b27de77..9433965935 100644
--- a/test/files/scalacheck/quasiquotes/ErrorProps.scala
+++ b/test/files/scalacheck/quasiquotes/ErrorProps.scala
@@ -172,6 +172,27 @@ object ErrorProps extends QuasiquoteProperties("errors") {
tq"_"
""")
+ property("SI-8420: don't crash on splicing of non-unliftable native type (1)") = fails(
+ "Can't unquote List[reflect.runtime.universe.Symbol] with .., consider omitting the dots or providing an implicit instance of Liftable[reflect.runtime.universe.Symbol]",
+ """
+ val l: List[Symbol] = Nil
+ q"f(..$l)"
+ """)
+
+ property("SI-8420: don't crash on splicing of non-unliftable native type (2)") = fails(
+ "Can't unquote List[reflect.runtime.universe.FlagSet] with .., consider omitting the dots or providing an implicit instance of Liftable[reflect.runtime.universe.FlagSet]",
+ """
+ val l: List[FlagSet] = Nil
+ q"f(..$l)"
+ """)
+
+ property("SI-8420: don't crash on splicing of non-unliftable native type (3)") = fails(
+ "Can't unquote List[reflect.runtime.universe.Modifiers] with .., consider omitting the dots or providing an implicit instance of Liftable[reflect.runtime.universe.Modifiers]",
+ """
+ val l: List[Modifiers] = Nil
+ q"f(..$l)"
+ """)
+
// // Make sure a nice error is reported in this case
// { import Flag._; val mods = NoMods; q"lazy $mods val x: Int" }
}