diff options
author | Iulian Dragos <jaguarul@gmail.com> | 2012-09-04 20:36:47 +0200 |
---|---|---|
committer | Iulian Dragos <jaguarul@gmail.com> | 2012-09-04 20:36:47 +0200 |
commit | 3415436b67ae7889a11ce2537576ca49b328aecc (patch) | |
tree | e601ec5570c043be77bc1a1fd84bb81ad6759492 /test/files/run/t5064.scala | |
parent | 5415272018114bb2e15036c5d6f9ae9c5af625d2 (diff) | |
download | scala-3415436b67ae7889a11ce2537576ca49b328aecc.tar.gz scala-3415436b67ae7889a11ce2537576ca49b328aecc.tar.bz2 scala-3415436b67ae7889a11ce2537576ca49b328aecc.zip |
Fixed positions in de-aliased special symbols and for automatically added `apply` methods.
Fixed #5064, thanks to @paulp who showed the right direction (and how to test it).
Diffstat (limited to 'test/files/run/t5064.scala')
-rw-r--r-- | test/files/run/t5064.scala | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/files/run/t5064.scala b/test/files/run/t5064.scala new file mode 100644 index 0000000000..35f0951765 --- /dev/null +++ b/test/files/run/t5064.scala @@ -0,0 +1,23 @@ +import scala.tools.partest._ + +object Test extends CompilerTest { + import global._ + override def extraSettings = super.extraSettings + " -Yrangepos" + override def sources = List( + """|class T5064 { + | List(1) + | Seq(1) + | List + | Seq + | Nil + |}""".stripMargin + ) + def check(source: String, unit: CompilationUnit) { + for (ClassDef(_, _, _, Template(_, _, stats)) <- unit.body ; stat <- stats ; t <- stat) { + t match { + case _: Select | _: Apply | _: This => println("%-15s %s".format(t.pos.show, t)) + case _ => + } + } + } +}
\ No newline at end of file |