Code behaves incorrectly if it is compiled in std.functional

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 4 20:45:18 PDT 2015


On Fri, 05 Jun 2015 03:15:45 +0000, anonymous wrote:

> On Friday, 5 June 2015 at 02:38:39 UTC, ketmar wrote:
>> here's dustmited source:
> 
> Further reduced:
> 
> void unaryFun()(auto int a) pure nothrow @safe @nogc {}
> alias Identity(F) = F;
> void main()
> {
>    unaryFun!()(41);
>    static void fun(int n) pure nothrow @safe @nogc {}
>    alias F = typeof(fun);
>    pragma(msg, F); /* ...(int n) */
>    pragma(msg, Identity!F); /* ...(auto int) */
> }

`auto int a`?! it shouldn't be accepted at all!

O_O
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20150605/cf9503d2/attachment.sig>


More information about the Digitalmars-d mailing list