diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2014-12-04 16:55:50 +0100 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2014-12-04 16:55:50 +0100 |
commit | 3eddd4cc1736defe9743f31765df3d42b7f211d4 (patch) | |
tree | 73f49773be283cde7693a403784fb51b468435d1 /test/files | |
parent | 40547cd02aeb8bbd3682a281d8a1c5afcab782ee (diff) | |
parent | db8d5476537902760d33d29839afd813ff369ac8 (diff) | |
download | scala-3eddd4cc1736defe9743f31765df3d42b7f211d4.tar.gz scala-3eddd4cc1736defe9743f31765df3d42b7f211d4.tar.bz2 scala-3eddd4cc1736defe9743f31765df3d42b7f211d4.zip |
Merge pull request #4185 from som-snytt/issue/9027
SI-9027 Parser no longer consumes space after multi XML elements
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/run/t9027.check | 19 | ||||
-rw-r--r-- | test/files/run/t9027.scala | 15 |
2 files changed, 34 insertions, 0 deletions
diff --git a/test/files/run/t9027.check b/test/files/run/t9027.check new file mode 100644 index 0000000000..3429254286 --- /dev/null +++ b/test/files/run/t9027.check @@ -0,0 +1,19 @@ +{ + { + val $buf = new _root_.scala.xml.NodeBuffer(); + $buf.$amp$plus(new _root_.scala.xml.Elem(null, "a", _root_.scala.xml.Null, $scope, true)); + $buf.$amp$plus(new _root_.scala.xml.Elem(null, "b", _root_.scala.xml.Null, $scope, true)); + $buf + }; + println("hello, world.") +} +{ + { + val $buf = new _root_.scala.xml.NodeBuffer(); + $buf.$amp$plus(new _root_.scala.xml.Elem(null, "a", _root_.scala.xml.Null, $scope, true)); + $buf.$amp$plus(new _root_.scala.xml.Elem(null, "b", _root_.scala.xml.Null, $scope, true)); + $buf.$amp$plus(new _root_.scala.xml.Elem(null, "c", _root_.scala.xml.Null, $scope, true)); + $buf + }; + println("hello, world.") +} diff --git a/test/files/run/t9027.scala b/test/files/run/t9027.scala new file mode 100644 index 0000000000..26238147da --- /dev/null +++ b/test/files/run/t9027.scala @@ -0,0 +1,15 @@ + +// used to be parsed as .println +object Test extends App { + import reflect.runtime._, universe._ + + val trees = List( + q"""<a/><b/> + println("hello, world.")""", + q"""<a/> + <b/> + <c/> + println("hello, world.")""" + ) + trees foreach println +} |