From 393829489a1e352c2ed659b16b6bea24069f4f9a Mon Sep 17 00:00:00 2001 From: Denys Shabalin Date: Thu, 16 Jan 2014 11:58:38 +0100 Subject: SI-6844 restrict splicing in parameter position MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously were a bit too permissive on how splicing in function parameter position worked. This made confusing things like possible: val x = TermName(“x”) q”def foo($x)” Now you can either splice trees in that position (ValDefs) or you have to provide type if you splice a name. --- test/files/neg/t6844.scala | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 test/files/neg/t6844.scala (limited to 'test/files/neg/t6844.scala') 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)" +} -- cgit v1.2.3