You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code should print 2 but writes random numbers instead:
void main() @safe
{
import std.stdio : writeln;
writeln(identity(2));
}
int identity(immutable int q) pure nothrow @safe@nogc
{
import std.algorithm : map;
static immutable auto arr = [42];int getSecondArgument(int a, int b){ return b;}return arr.map!((int a, int b = q) => getSecondArgument(a, b))[0];
}
The text was updated successfully, but these errors were encountered:
Malte reported this on 2018-05-26T16:12:25Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=18909
CC List
Description
The text was updated successfully, but these errors were encountered: