```d
public class cSomething {

   private:

   dstring pstrWhatever = null;

   public:

   @safe dstring whatever() { return pstrWhatever; }
@safe void whatever(const dstring lstrWhatever) { pstrWhatever = lstrWhatever; }

}

void main() {

   cSomething lobjSomething = new cSomething();
   lobjSomething.whatever = r"abc"d;
lobjSomething.whatever ~= r"def"d; /// Error: `lobjSomething.whatever()` is not an lvalue and cannot be modified

}
```


Reply via email to