[Issue 13526] Allow statement: with(auto p = new Panel())

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Sep 24 16:40:08 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13526

Ketmar Dark <ketmar at ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ketmar at ketmar.no-ip.org

--- Comment #1 from Ketmar Dark <ketmar at ketmar.no-ip.org> ---
Created attachment 1432
  --> https://issues.dlang.org/attachment.cgi?id=1432&action=edit
preliminary realization

this is quick-and-dirty patch that allows declarations in with(). hdrgen emits
fixed .di files too.

please note that this is my first patch outside of parser scope and i'm not
sure what i'm doing here. it seems to work on simple test cases (see second
attachement) but it need to be reviewed by someone who knows compiler
internals.

so far the patch seems to not breaking existing code, so it can be safely
tested.

--


More information about the Digitalmars-d-bugs mailing list