summaryrefslogtreecommitdiff
path: root/test/files/scalacheck/quasiquotes/ErrorProps.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/scalacheck/quasiquotes/ErrorProps.scala')
-rw-r--r--test/files/scalacheck/quasiquotes/ErrorProps.scala21
1 files changed, 14 insertions, 7 deletions
diff --git a/test/files/scalacheck/quasiquotes/ErrorProps.scala b/test/files/scalacheck/quasiquotes/ErrorProps.scala
index cb46a60dbe..92d299bede 100644
--- a/test/files/scalacheck/quasiquotes/ErrorProps.scala
+++ b/test/files/scalacheck/quasiquotes/ErrorProps.scala
@@ -105,13 +105,6 @@ object ErrorProps extends QuasiquoteProperties("errors") {
q"f($sb)"
""")
- property("casedef expected") = fails(
- "reflect.runtime.universe.CaseDef expected but reflect.runtime.universe.Tree found",
- """
- val t = EmptyTree
- q"_ { case $t }"
- """)
-
property("can't splice with ... card here") = fails(
"Can't splice with ... here",
"""
@@ -179,6 +172,20 @@ object ErrorProps extends QuasiquoteProperties("errors") {
val q"$m1 $m2 def foo" = EmptyTree
""")
+ property("can't splice values of Null") = fails(
+ "Can't splice Null, bottom type values often indicate programmer mistake",
+ """
+ val n = null
+ q"$n"
+ """)
+
+ property("can't splice values of Nothing") = fails(
+ "Can't splice Nothing, bottom type values often indicate programmer mistake",
+ """
+ def n = ???
+ q"$n"
+ """)
+
// // Make sure a nice error is reported in this case
// { import Flag._; val mods = NoMods; q"lazy $mods val x: Int" }
} \ No newline at end of file