From 973c7066b8e0ab3529ce42989091f31d410a32ab Mon Sep 17 00:00:00 2001 From: Denys Shabalin Date: Tue, 14 Jan 2014 15:46:12 +0100 Subject: 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. --- test/files/scalacheck/quasiquotes/TermConstructionProps.scala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/files/scalacheck/quasiquotes/TermConstructionProps.scala') 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) + } } -- cgit v1.2.3