summaryrefslogtreecommitdiff
path: root/test/files/run/t5052.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-10-31 18:26:41 +0000
committerPaul Phillips <paulp@improving.org>2011-10-31 18:26:41 +0000
commitbf0b9fcf84d346231db868e522dce17ded59888e (patch)
tree96018455ecbe2abcab7a1f347c814347c9a1d2e0 /test/files/run/t5052.scala
parent8de176f454d1e365b1297de21a0ed4a45c04a87f (diff)
downloadscala-bf0b9fcf84d346231db868e522dce17ded59888e.tar.gz
scala-bf0b9fcf84d346231db868e522dce17ded59888e.tar.bz2
scala-bf0b9fcf84d346231db868e522dce17ded59888e.zip
Fixes NPE using iterator with an XML attribute ...
Fixes NPE using iterator with an XML attribute being null or None ) (SI-5052 Also fixes incorrect size method (SI-5115 ) Contributed by Jordi Salvat i Alabart. Closes SI-5052, SI-5115, no review.
Diffstat (limited to 'test/files/run/t5052.scala')
-rw-r--r--test/files/run/t5052.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/run/t5052.scala b/test/files/run/t5052.scala
new file mode 100644
index 0000000000..9e418e8ac5
--- /dev/null
+++ b/test/files/run/t5052.scala
@@ -0,0 +1,6 @@
+object Test extends App {
+ assert(<elem attr={null:String} /> xml_== <elem />)
+ assert(<elem attr={None} /> xml_== <elem />)
+ assert(<elem /> xml_== <elem attr={null:String} />)
+ assert(<elem /> xml_== <elem attr={None} />)
+}