From e1bef09d8afe58d00aa0620ee1fd5e7ff92fe470 Mon Sep 17 00:00:00 2001 From: Den Shabalin Date: Thu, 8 Aug 2013 18:55:45 +0200 Subject: SI-6843 well-positioned syntax errors for quasiquotes This is achieved in a following way: 1. Similarly to toolbox quasiquotes can go away with wrapping for parsing purpose after introduction of `parseStats` and `parseRule` entry points. 2. In case of syntax error quasiquote computes equivalent corresponding position in the source code with the help of `corrrespondingPosition` mapper which relies on position data collected into `posMap` during code generation. --- test/files/scalacheck/quasiquotes/ErrorProps.scala | 6 ------ 1 file changed, 6 deletions(-) (limited to 'test/files/scalacheck') diff --git a/test/files/scalacheck/quasiquotes/ErrorProps.scala b/test/files/scalacheck/quasiquotes/ErrorProps.scala index 044a332a04..b9e69e0e88 100644 --- a/test/files/scalacheck/quasiquotes/ErrorProps.scala +++ b/test/files/scalacheck/quasiquotes/ErrorProps.scala @@ -188,12 +188,6 @@ object ErrorProps extends QuasiquoteProperties("errors") { val q"$m1 $m2 def foo" = EmptyTree """) - property("can't parse more than one casedef") = fails( - "Can't parse more than one casedef, consider generating a match tree instead", - """ - cq"1 => 2 case 3 => 5" - """) - // // Make sure a nice error is reported in this case // { import Flag._; val mods = NoMods; q"lazy $mods val x: Int" } } \ No newline at end of file -- cgit v1.2.3