diff options
author | Denys Shabalin <denys.shabalin@typesafe.com> | 2014-02-24 18:35:59 +0100 |
---|---|---|
committer | Denys Shabalin <denys.shabalin@typesafe.com> | 2014-02-28 11:28:38 +0100 |
commit | 51b8e6c020d39393c471dcfee389c5f0f7510afd (patch) | |
tree | 75eac002632749d6fd32d31101934a7f9b71da37 /test | |
parent | 13e7b8112fb412bb3ed29716409087aed0f2a7e4 (diff) | |
download | scala-51b8e6c020d39393c471dcfee389c5f0f7510afd.tar.gz scala-51b8e6c020d39393c471dcfee389c5f0f7510afd.tar.bz2 scala-51b8e6c020d39393c471dcfee389c5f0f7510afd.zip |
SI-8285 use correct kind of map for quasiquote positions
Previously mutable.ListMap was used with assumption that it preserved
order of inserted elements (but it doesn't). Surprisingly logic that
assumed ordered elements worked mosly fine on unordered ones. I guess
two bugs can cancel each other out.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/quasiquotes-syntax-error-position.check | 14 | ||||
-rw-r--r-- | test/files/neg/quasiquotes-syntax-error-position.scala | 5 |
2 files changed, 18 insertions, 1 deletions
diff --git a/test/files/neg/quasiquotes-syntax-error-position.check b/test/files/neg/quasiquotes-syntax-error-position.check index fd55bd25b5..9fd6ce0417 100644 --- a/test/files/neg/quasiquotes-syntax-error-position.check +++ b/test/files/neg/quasiquotes-syntax-error-position.check @@ -32,4 +32,16 @@ quasiquotes-syntax-error-position.scala:14: error: ')' expected but end of quote quasiquotes-syntax-error-position.scala:15: error: ':' expected but ')' found. q"def foo(x)" ^ -11 errors found +quasiquotes-syntax-error-position.scala:16: error: illegal start of simple expression + q"$a(])" + ^ +quasiquotes-syntax-error-position.scala:17: error: in XML literal: '>' expected instead of '$' + q"foo bar <xml$a>" + ^ +quasiquotes-syntax-error-position.scala:19: error: ';' expected but '<:' found. + q"val $x: $x <: $x" + ^ +quasiquotes-syntax-error-position.scala:20: error: '=' expected but '.' found. + q"def f ( $x ) . $x" + ^ +15 errors found diff --git a/test/files/neg/quasiquotes-syntax-error-position.scala b/test/files/neg/quasiquotes-syntax-error-position.scala index 7b1d66ba00..823fe9a551 100644 --- a/test/files/neg/quasiquotes-syntax-error-position.scala +++ b/test/files/neg/quasiquotes-syntax-error-position.scala @@ -13,4 +13,9 @@ object test extends App { cq"pattern => body ; case pattern2 =>" pq"$a(bar" q"def foo(x)" + q"$a(])" + q"foo bar <xml$a>" + val x = q"x" + q"val $x: $x <: $x" + q"def f ( $x ) . $x" } |