Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions changelog/2.076.0.dd
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static foreach(i; 0 .. 10)

// a `static foreach` body does not introduce a nested scope
// (similar to `static if`).

// The following mixin declaration is at module scope:
mixin(`enum x` ~ to!string(i) ~ ` = i;`); // declares 10 variables x0, x1, ..., x9
}
Expand All @@ -87,7 +87,7 @@ void main()

// `static foreach` has both declaration and statement forms
// (similar to `static if`).

static foreach(x; iota(3).map!(i => tuple(text("x", i), i)))
{
// generates three local variables x0, x1 and x2.
Expand All @@ -98,7 +98,7 @@ void main()
writeln(mixin(x[0]));
}
}

writeln(x0," ",x1," ",x2); // first runtime output
}
---
Expand Down Expand Up @@ -201,7 +201,7 @@ static foreach(i; 0 .. 10)

// a `static foreach` body does not introduce a nested scope
// (similar to `static if`).

// The following mixin declaration is at module scope:
mixin(`enum x` ~ to!string(i) ~ ` = i;`); // declares 10 variables x0, x1, ..., x9
}
Expand All @@ -225,7 +225,7 @@ void main()

// `static foreach` has both declaration and statement forms
// (similar to `static if`).

static foreach(x; iota(3).map!(i => tuple(text("x", i), i)))
{
// generates three local variables x0, x1 and x2.
Expand All @@ -236,7 +236,7 @@ void main()
writeln(mixin(x[0]));
}
}

writeln(x0," ",x1," ",x2); // first runtime output
}
---
Expand Down