summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/quasiquotes-syntax-error-position.check5
-rw-r--r--test/files/neg/quasiquotes-syntax-error-position.scala3
-rw-r--r--test/files/neg/t6844.check6
-rw-r--r--test/files/neg/t6844.scala5
4 files changed, 17 insertions, 2 deletions
diff --git a/test/files/neg/quasiquotes-syntax-error-position.check b/test/files/neg/quasiquotes-syntax-error-position.check
index 25e5b8d75a..14fef16e01 100644
--- a/test/files/neg/quasiquotes-syntax-error-position.check
+++ b/test/files/neg/quasiquotes-syntax-error-position.check
@@ -29,4 +29,7 @@ quasiquotes-syntax-error-position.scala:13: error: end of quote expected but 'ca
quasiquotes-syntax-error-position.scala:14: error: ')' expected but end of quote found.
pq"$a(bar"
^
-10 errors found
+quasiquotes-syntax-error-position.scala:15: error: ':' expected but ')' found.
+ q"def foo(x)"
+ ^
+11 errors found
diff --git a/test/files/neg/quasiquotes-syntax-error-position.scala b/test/files/neg/quasiquotes-syntax-error-position.scala
index b97af52cfc..7b1d66ba00 100644
--- a/test/files/neg/quasiquotes-syntax-error-position.scala
+++ b/test/files/neg/quasiquotes-syntax-error-position.scala
@@ -12,4 +12,5 @@ object test extends App {
tq"$t => $t $t]"
cq"pattern => body ; case pattern2 =>"
pq"$a(bar"
-} \ No newline at end of file
+ q"def foo(x)"
+}
diff --git a/test/files/neg/t6844.check b/test/files/neg/t6844.check
new file mode 100644
index 0000000000..1fc2485520
--- /dev/null
+++ b/test/files/neg/t6844.check
@@ -0,0 +1,6 @@
+t6844.scala:4: error: type mismatch;
+ found : reflect.runtime.universe.TermName
+ required: reflect.runtime.universe.Tree
+ q"def foo($x)"
+ ^
+one error found
diff --git a/test/files/neg/t6844.scala b/test/files/neg/t6844.scala
new file mode 100644
index 0000000000..809d9d0f98
--- /dev/null
+++ b/test/files/neg/t6844.scala
@@ -0,0 +1,5 @@
+import scala.reflect.runtime.universe._
+object Test extends App {
+ val x = TermName("x")
+ q"def foo($x)"
+}