diff options
author | Paul Phillips <paulp@improving.org> | 2009-04-30 17:39:06 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-04-30 17:39:06 +0000 |
commit | 90fa917f34edc3e2a53f25122d0a744e159a7ca5 (patch) | |
tree | 1632a0b6cfc937352c5ca1387388ff8cd8cec967 | |
parent | 9f907e58135915166fb4fca94ca4d5197f9142dd (diff) | |
download | scala-90fa917f34edc3e2a53f25122d0a744e159a7ca5.tar.gz scala-90fa917f34edc3e2a53f25122d0a744e159a7ca5.tar.bz2 scala-90fa917f34edc3e2a53f25122d0a744e159a7ca5.zip |
Fix and test case for #1626.
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/SymbolicXMLBuilder.scala | 2 | ||||
-rw-r--r-- | test/files/pos/bug1626.scala | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/SymbolicXMLBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/SymbolicXMLBuilder.scala index ad5bfb7909..7b2f894e6b 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/SymbolicXMLBuilder.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/SymbolicXMLBuilder.scala @@ -254,6 +254,8 @@ abstract class SymbolicXMLBuilder(make: TreeBuilder, p: Parsers # Parser, preser uri1 match { case Apply(_, List(uri @ Literal(Constant(_)))) => //text tlist = mkAssign(uri) :: tlist + case Select(_, nme.Nil) => // allow for xmlns="" -- bug #1626 + tlist = mkAssign(Literal(Constant(null))) :: tlist case _ => tlist = mkAssign(uri1) :: tlist //println("SymbolicXMLBuilder::handleNamespaceBinding:") diff --git a/test/files/pos/bug1626.scala b/test/files/pos/bug1626.scala new file mode 100644 index 0000000000..41072f2384 --- /dev/null +++ b/test/files/pos/bug1626.scala @@ -0,0 +1,4 @@ +object o { + val n = <a xmlns=""/> + n.namespace == null +}
\ No newline at end of file |