Re: Why: error("multiple ! arguments are not allowed");

2017-05-21 Thread Daniel N via Digitalmars-d
On Sunday, 21 May 2017 at 14:11:00 UTC, Stanislav Blinov wrote: On Sunday, 21 May 2017 at 13:42:50 UTC, Vladimir Panteleev wrote: On Sunday, 21 May 2017 at 13:08:18 UTC, Adam D. Ruppe wrote: foo!(x)!y I think it's the same as foo!x!y. As for the reason - I think because the order is

Re: Why: error("multiple ! arguments are not allowed");

2017-05-21 Thread Stanislav Blinov via Digitalmars-d
On Sunday, 21 May 2017 at 13:42:50 UTC, Vladimir Panteleev wrote: On Sunday, 21 May 2017 at 13:08:18 UTC, Adam D. Ruppe wrote: foo!(x)!y I think it's the same as foo!x!y. As for the reason - I think because the order is possibly ambiguous or something? You could interpret it as either

Re: Why: error("multiple ! arguments are not allowed");

2017-05-21 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 21 May 2017 at 13:08:18 UTC, Adam D. Ruppe wrote: foo!(x)!y I think it's the same as foo!x!y. As for the reason - I think because the order is possibly ambiguous or something? You could interpret it as either (foo!x)!y or foo!(x!y).

Re: Why: error("multiple ! arguments are not allowed");

2017-05-21 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 21 May 2017 at 13:08:18 UTC, Adam D. Ruppe wrote: If I comment that line and use the hacked dmd, it seems to work. Well, not exactly work, it didn't actually instantiate the inner template like it probably should have. So is it just not implemented correctly and became an error

Why: error("multiple ! arguments are not allowed");

2017-05-21 Thread Adam D. Ruppe via Digitalmars-d
Why is that prohibited? I just wrote template foo(x) { template foo(y) {}} and did foo!(x)!y and it triggered that error. If I comment that line and use the hacked dmd, it seems to work. So why is that error there?