View source code
Display the source code in dmd/statement.d from which this
page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a
Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Function dmd.statement.ForwardingStatement.flatten
ForwardingStatements are distributed over the flattened sequence of statements. This prevents flattening to be "blocked" by a ForwardingStatement and is necessary, for example, to support generating scope guards with `static foreach`:
override extern(C++) dmd .root .array .Array!(dmd.statement.Statement)* flatten
(
dmd .dscope .Scope* sc
);
static foreach(i; 0 .. 10) scope(exit) writeln(i); writeln("this is printed first"); // then, it prints 10, 9, 8, 7, ...
Authors
License
Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.