diff options
author | Paul Phillips <paulp@improving.org> | 2012-03-11 00:14:16 -0500 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-07-17 12:04:38 +0200 |
commit | 32fd97df41bb2e99018f024f41b06490e41bd7ad (patch) | |
tree | 4b40fb915776892da3de3227f771a205a2c38a82 /test/files/run/t5385.scala | |
parent | 0cfd858a38ddf0ac83d9bbefe85110f88dc707c0 (diff) | |
download | scala-32fd97df41bb2e99018f024f41b06490e41bd7ad.tar.gz scala-32fd97df41bb2e99018f024f41b06490e41bd7ad.tar.bz2 scala-32fd97df41bb2e99018f024f41b06490e41bd7ad.zip |
Fix for SI-5385.
Nodes which hit EOF with no whitespace afterward had
wrong position.
Diffstat (limited to 'test/files/run/t5385.scala')
-rw-r--r-- | test/files/run/t5385.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t5385.scala b/test/files/run/t5385.scala new file mode 100644 index 0000000000..b803897e71 --- /dev/null +++ b/test/files/run/t5385.scala @@ -0,0 +1,16 @@ +import scala.tools.partest._ + +object Test extends CompilerTest { + import global._ + override def extraSettings = super.extraSettings + " -Yrangepos" + override def sources = List( + "class Azz", "class Bzz ", "class Czz ", "class Dzz\n", + "class Ezz{}", "class Fzz{} ", "class Gzz { }", "class Hzz { } " + ) + def check(source: String, unit: CompilationUnit) { + unit.body foreach { + case cdef: ClassDef => println("%-15s class %s".format(cdef.pos.show, cdef.name)) + case _ => + } + } +} |