summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/si7980.check4
-rw-r--r--test/files/neg/si7980.scala8
2 files changed, 12 insertions, 0 deletions
diff --git a/test/files/neg/si7980.check b/test/files/neg/si7980.check
new file mode 100644
index 0000000000..b085cabf1d
--- /dev/null
+++ b/test/files/neg/si7980.check
@@ -0,0 +1,4 @@
+si7980.scala:7: error: Can't splice Nothing, bottom type values often indicate programmer mistake
+ println(q"class ${Name(X)} { }")
+ ^
+one error found
diff --git a/test/files/neg/si7980.scala b/test/files/neg/si7980.scala
new file mode 100644
index 0000000000..b21907de54
--- /dev/null
+++ b/test/files/neg/si7980.scala
@@ -0,0 +1,8 @@
+object Test extends App {
+ import scala.reflect.runtime.universe._
+ def Name[T:TypeTag](name:String): T = implicitly[TypeTag[T]] match {
+ case t => newTypeName(name).asInstanceOf[T]
+ }
+ val X = "ASDF"
+ println(q"class ${Name(X)} { }")
+}