diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-03-25 11:57:01 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-03-25 11:57:01 +0100 |
commit | 430e9d88ed0bc58782638c97733690daa18596f8 (patch) | |
tree | fcf4f94ffe6152356f186f922e7dee2bf7f7ea8b /test | |
parent | 2aeb90778eafb8c3afdb102989546dbe28a41da4 (diff) | |
parent | b6a54a8fa71515fd97c5f225c11b24d971a703c8 (diff) | |
download | scala-430e9d88ed0bc58782638c97733690daa18596f8.tar.gz scala-430e9d88ed0bc58782638c97733690daa18596f8.tar.bz2 scala-430e9d88ed0bc58782638c97733690daa18596f8.zip |
Merge pull request #3637 from densh/si/8420
SI-8420 don't crash on unquoting of non-liftable native type
Diffstat (limited to 'test')
-rw-r--r-- | test/files/scalacheck/quasiquotes/ErrorProps.scala | 21 |
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" } } |