Skip to content

XML comparison between Node and NodeSeq broken #3334

@scabug

Description

@scabug
Welcome to Scala version 2.8.0.RC1 (Java HotSpot(TM) Server VM, Java 1.6.0_16).
Type in expressions to have them evaluated.
Type :help for more information.

scala> val xml = <foo>bar</foo>
xml: scala.xml.Elem = <foo>bar</foo>

scala> val x2 = xml.map(i => i)
x2: scala.xml.NodeSeq = NodeSeq(<foo>bar</foo>)

scala> x2 == xml
res0: Boolean = false

scala> xml == x2
res1: Boolean = false

Old behavior:

scala> val xml = <foo>bar</foo>
xml: scala.xml.Elem = <foo>bar</foo>

scala> val x2 = xml.map(i => i)
x2: scala.xml.NodeSeq = <foo>bar</foo>

scala> x2 == xml
res0: Boolean = true

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions