summaryrefslogtreecommitdiff
path: root/test/files/scalacheck/quasiquotes/TermConstructionProps.scala
diff options
context:
space:
mode:
authorDenys Shabalin <denys.shabalin@typesafe.com>2014-01-14 15:46:12 +0100
committerDenys Shabalin <denys.shabalin@typesafe.com>2014-01-16 11:08:57 +0100
commit973c7066b8e0ab3529ce42989091f31d410a32ab (patch)
treeb2a6931d7c6640ca3107561e38038be7d8538a34 /test/files/scalacheck/quasiquotes/TermConstructionProps.scala
parent681308a3aa737be1dae0f702fddadce88c70f90e (diff)
downloadscala-973c7066b8e0ab3529ce42989091f31d410a32ab.tar.gz
scala-973c7066b8e0ab3529ce42989091f31d410a32ab.tar.bz2
scala-973c7066b8e0ab3529ce42989091f31d410a32ab.zip
SI-8148 fix anonymous functions with placeholders
Quasiquotes used to fail to generate proper fresh identifiers for anonymous functions like: q"_ + _" Due to improper initialization of FreshNameCreator in quasiquote parser which was erroneously not preserved throughout parsing of the code snippet but re-created on every invocation.
Diffstat (limited to 'test/files/scalacheck/quasiquotes/TermConstructionProps.scala')
-rw-r--r--test/files/scalacheck/quasiquotes/TermConstructionProps.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/files/scalacheck/quasiquotes/TermConstructionProps.scala b/test/files/scalacheck/quasiquotes/TermConstructionProps.scala
index 6fb05ff9a4..38fbfa9f7f 100644
--- a/test/files/scalacheck/quasiquotes/TermConstructionProps.scala
+++ b/test/files/scalacheck/quasiquotes/TermConstructionProps.scala
@@ -224,4 +224,9 @@ object TermConstructionProps extends QuasiquoteProperties("term construction") {
property("SI-8009") = test {
q"`foo`".asInstanceOf[reflect.internal.SymbolTable#Ident].isBackquoted
}
+
+ property("SI-8148") = test {
+ val q"($a, $b) => $_" = q"_ + _"
+ assert(a.name != b.name)
+ }
}