[Issue 14656] New: "auto" of "auto ref" spills over to other function
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jun 5 13:00:12 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14656
Issue ID: 14656
Summary: "auto" of "auto ref" spills over to other function
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: ag0aep6g at gmail.com
----
void unaryFun()(auto ref 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) */
}
----
Shouldn't print "auto" as fun has no "auto" on the parameter.
--
More information about the Digitalmars-d-bugs
mailing list