diff options
-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 |