Hi,
I just wonder why "with (auto p = new ...)" is not working.
It would be some syntax sugar in this scenario:
with (auto p = new Panel())
{
parent = this;
text = "bla";
with
On Tuesday, 23 September 2014 at 15:19:59 UTC, Andre wrote:
I just wonder why "with (auto p = new ...)" is not working.
It would be some syntax sugar in this scenario:
I presume with is limited to expressions and not statements as
the messages says.
However, you can use
How about:
auto b - new Button(); with (b) {
On Tuesday, 23 September 2014 at 15:19:59 UTC, Andre wrote:
Hi,
I just wonder why "with (auto p = new ...)" is not working.
It would be some syntax sugar in this scenario:
with (auto p = new Panel())
{
f scope if that's an issue:
...
text = "blah";
{
auto b = new Button(); with (b) {
...
}
}
// b is no longer in scope
Graham
On Tuesday, 23 September 2014 at 15:19:59 UTC, Andre wrote:
Hi,
I just wonder why "with (auto p = ne
e if that's an issue:
...
text = "blah";
{
auto b = new Button(); with (b) {
...
}
}
// b is no longer in scope
Graham
On Tuesday, 23 September 2014 at 15:19:59 UTC, Andre wrote:
Hi,
I just wonder why "with (auto p = new ...)&
I think this is just a language oversight. It's allowed in if
statements, and people have made a good case for allowing it for
switch statements. It just hasn't been implemented. I made an
attempt one evening to implement it for switch statements, but
I'm not at all familiar with DMD, so I put
On Tuesday, 23 September 2014 at 20:16:29 UTC, andre wrote:
Therefore it seems strange,the same does not work with auto.
Yes, it seem logical to me allow this also in with and switch.
aOn Tuesday, 23 September 2014 at 15:19:59 UTC, Andre wrote:
Hi,
I just wonder why "with (auto p = new ...)" is not working.
It would be some syntax sugar in this scenario:
with (auto p = new Panel())
{
parent = this;
t
Enhancement 13526 filed:
https://issues.dlang.org/show_bug.cgi?id=13526
On Wed, 24 Sep 2014 14:39:25 +
Andre via Digitalmars-d-learn wrote:
> Enhancement 13526 filed:
> https://issues.dlang.org/show_bug.cgi?id=13526
i wrote a quickhack-patch for this ER. as it's my first patch that
goes outside parser it needs to be reviewed by someone who knows
compiler internal
On Tuesday, 23 September 2014 at 15:19:59 UTC, Andre wrote:
Hi,
I just wonder why "with (auto p = new ...)" is not working.
It would be some syntax sugar in this scenario:
with (auto p = new Panel())
{
parent = this;
t
On Friday, 26 September 2014 at 19:59:56 UTC, Freddy wrote:
On Tuesday, 23 September 2014 at 15:19:59 UTC, Andre wrote:
Hi,
I just wonder why "with (auto p = new ...)" is not working.
It would be some syntax sugar in this scenario:
with (auto p =
12 matches
Mail list logo