From 543c22858f0249425a64a53811c5fc1bcd21320b Mon Sep 17 00:00:00 2001 From: Burak Emir Date: Wed, 11 Oct 2006 09:19:40 +0000 Subject: attribute nillable --- test/files/jvm/xmlattr.scala | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 test/files/jvm/xmlattr.scala (limited to 'test/files/jvm') diff --git a/test/files/jvm/xmlattr.scala b/test/files/jvm/xmlattr.scala new file mode 100644 index 0000000000..a8843cc467 --- /dev/null +++ b/test/files/jvm/xmlattr.scala @@ -0,0 +1,23 @@ +import scala.xml._ +object foo extends Application { + { + var z:NodeSeq = null + + Console.println(z) + Console.println(z==null) + var x = new UnprefixedAttribute("foo","bar", Null) + //x = new UnprefixedAttribute("foo", null:Seq[Node], x) + Console.println(x.toString) + Console.println(x.get("foo")) // Some(bar) + Console.println(x("foo")) // bar + + val y = x.remove("foo") + Console.println(y.toString) + Console.println(y == Null) // true + + x = new UnprefixedAttribute("foo", z, x) + Console.println(x.toString) + Console.println(x.get("foo")) // None + Console.println(x("foo")) // null + } +} -- cgit v1.2.3