std.xml: make work with -dip1000#5387
Conversation
| override string toString() scope const @safe pure nothrow { return "<!--" ~ content ~ "-->"; } | ||
|
|
||
| override @property @safe @nogc pure nothrow bool isEmptyXML() const { return false; } /// Returns false always | ||
| override @property @safe @nogc pure nothrow scope bool isEmptyXML() const { return false; } /// Returns false always |
There was a problem hiding this comment.
This is getting out of hand
There was a problem hiding this comment.
Hm... I'm curious why this is necessary, as this doesn't return any references and is pure?
There was a problem hiding this comment.
This is getting out of hand
The whole std.xml needs to go anyway. If it was a templated object, most of these attributes would simply be inferred.
There was a problem hiding this comment.
There is a very simple solution: just write it as isEmptyXML()() instead, and boom, you have compiler attribute inference.
(Though I understand that this doesn't always work all of the time, but it's worth a try.)
There was a problem hiding this comment.
Oh wait, this is an override. Nevermind what I said. :-(
andralex
left a comment
There was a problem hiding this comment.
A lot of this code is not covered. Not this PR's fault though.
|
the released version of druntime is incompatible with this. |
I don't think we need to worry about that, dmd/druntime/phobos are developed in sync and there is no expectation that mixing versions works. |
Agreed and FWIW Phobos-dev is almost never works compatible with the released version - just try to compile a normal D file with a few imports to Phobos in the Phobos |
|
druntime ~master is also incompatible. |
|
If that were so then all CI would be broken, so look for the problem elsewhere. |
Have you cleaned dmd, druntime and Phobos and built from scratch? |
|
EDIT: |
Add annotations to make its interaction with Object safe, and scope to make it work with -dip1000.
It requires covariant overrides to work, so it is blocked by dlang/dmd#6731