Comment #0 by dlang-bugzilla — 2011-09-17T11:13:19Z
The most common use of WithStatements in my D1 codebase was:
with (someFunction(...)) ...
D2 disallows this - for some reason it demands that the expression be an lvalue. I don't see this in the spec, either.
Comment #1 by yebblies — 2011-09-19T18:02:33Z
*** Issue 6694 has been marked as a duplicate of this issue. ***
Comment #2 by yebblies — 2012-02-14T06:47:55Z
https://github.com/D-Programming-Language/dmd/pull/716
This is arguably a bug, I can't find anywhere in the spec that says 'with' only works with lvalues or it must be implemented by taking the address of structs, just that exp must only be evaluated once.
Comment #3 by michal.minich — 2012-02-14T07:13:05Z
(In reply to comment #3)
> (In reply to comment #2)
> > https://github.com/D-Programming-Language/dmd/pull/716
> >
> > This is arguably a bug, I can't find anywhere in the spec that says 'with' only
> > works with lvalues or it must be implemented by taking the address of structs,
> > just that exp must only be evaluated once.
>
> This might be related http://d.puremagic.com/issues/show_bug.cgi?id=4350
> Does the pull request affect this case?
Unlikely, that looks like an unrelated lookup problem.
Comment #5 by github-bugzilla — 2012-02-18T21:32:49Z