I logged this bug a while ago:
https://issues.dlang.org/show_bug.cgi?id=10291
On Friday, 2 May 2014 at 10:06:43 UTC, ref2401 wrote:
Is it a bug or is there a reason for such behaviour?
On Friday, 2 May 2014 at 10:23:03 UTC, Andrej Mitrovic via
Digitalmars-d-learn wrote:
Ouch, ouch, ouch! What's happening is that the 'clear' Appender
method
is only compiled-in if the data is mutable, otherwise you end up
calling the object.clear UFCS function. So don't use clear here.
I don't
On 5/2/14, ref2401 via Digitalmars-d-learn
wrote:
> class MyClass {
> Appender!string _stringBuilder;
>
> this() {
> _stringBuilder = Appender!string(null);
> _stringBuilder.clear();
Ouch, ouch, ouch! What's happening is that the 'clear' Appender method
is
class MyClass {
Appender!string _stringBuilder;
this() {
_stringBuilder = Appender!string(null);
_stringBuilder.clear();
}
@property string str() {
return _stringBuilder.data;
}
void append(string s)