www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6685] New: Allow using "with" with rvalues

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6685

           Summary: Allow using "with" with rvalues
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: thecybershadow gmail.com



11:13:19 PDT ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 17 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6685


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com



*** Issue 6694 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 19 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6685


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, rejects-valid
                 CC|                            |yebblies gmail.com
         AssignedTo|nobody puremagic.com        |yebblies gmail.com
           Severity|enhancement                 |normal



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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 14 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6685


Michal Minich <michal.minich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |michal.minich gmail.com



PST ---

 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? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 14 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6685






 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. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 14 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6685




Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/bf611abd06b22e3b1fceb7967c825d13ffbc5258


Issue 6685 - Allow using "with" with rvalues

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 18 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6685


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 18 2012