[Issue 17351] Static const array can't be evaluated at compile time when passed as ref argument
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Apr 26 07:14:28 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17351
Andrei Alexandrescu <andrei at erdani.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrei at erdani.com
--- Comment #1 from Andrei Alexandrescu <andrei at erdani.com> ---
This issue is not particular to arrays. The following code also fails to
compile:
bool fun(S)(ref S a) { return true; } // (1)
void main()
{
static const int sa2 = 1;
static assert(fun(sa2));
}
--
More information about the Digitalmars-d-bugs
mailing list