Bug 14967 – std.xml.Tag doesn't include attributes in comparison

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-08-26T19:46:00Z
Last change time
2017-07-02T13:02:23Z
Assigned to
nobody
Creator
doob
See also
https://issues.dlang.org/show_bug.cgi?id=10381

Comments

Comment #0 by doob — 2015-08-26T19:46:20Z
Comment #1 by dlang-bugzilla — 2017-07-02T13:02:23Z
std.xml.Tag.opEquals is defined as: override bool opEquals(scope Object o) { const tag = toType!(const Tag)(o); return (name != tag.name) ? false : ( (attr != tag.attr) ? false : ( // <--- (type != tag.type) ? false : ( true ))); } For opCmp, it compares the AA's pointer, and refers to issue 10381. When reporting a bug, please always provide a self-contained, reproducible test case which exhibits the current and desired behaviour, unless you plan to work on the bug yourself. Incomplete bug reports will be closed; please reopen if you can post an example as described above.